* version 1.2.10

* makefile: versioning and tags: properly deal with multiple digits version tags
* setup.py: support both sdist and bdist pip wheels
This commit is contained in:
Mario Fink 2021-09-01 10:58:42 +02:00
parent 1345f6e4c9
commit 5e93ed0706
4 changed files with 16 additions and 8 deletions

View File

@ -15,7 +15,7 @@ extensions = Extension(
setup( setup(
name="imc_termite", name="imc_termite",
version='1.2.9', version='1.2.10',
description='IMCtermite cython extension', description='IMCtermite cython extension',
author='Record Evolution GmbH', author='Record Evolution GmbH',
author_email='mario.fink@record-evolution.de', author_email='mario.fink@record-evolution.de',

View File

@ -20,10 +20,10 @@ CC = g++ -std=c++17
OPT = -O3 -Wall -Werror -Wunused-variable -Wsign-compare OPT = -O3 -Wall -Werror -Wunused-variable -Wsign-compare
# determine git version/commit and release tag # determine git version/commit and release tag
GTAG := $(shell git tag | tail -n1) GTAG := $(shell git tag -l --sort=version:refname | tail -n1)
GHSH := $(shell git rev-parse HEAD | head -c8) GHSH := $(shell git rev-parse HEAD | head -c8)
RTAG := v$(shell cat pip/setup.py | grep version | grep -oP "([0-9]\.){2}[0-9]") RTAG := v$(shell cat pip/setup.py | grep version | grep -oP "([0-9]\.){2}[0-9]{1,2}")
CTAG := v$(shell cat cython/setup.py | grep version | grep -oP "([0-9]\.){2}[0-9]") CTAG := v$(shell cat cython/setup.py | grep version | grep -oP "([0-9]\.){2}[0-9]{1,2}")
# define install location # define install location
INST := /usr/local/bin INST := /usr/local/bin
@ -99,7 +99,7 @@ cython-clean :
# pip # pip
pip-release: check-vtag $(RTAG) cython-build pip-release: check-vtag $(RTAG) cython-build
cd ./pip/ && make publish cd ./pip/ && make publish-source
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
# clean # clean

View File

@ -2,15 +2,23 @@
SHELL := /bin/bash SHELL := /bin/bash
publish: sdist upload publish-source: sdist upload
publish-binary: bdist upload
sdist: ../cython/py_imc_termite.pyx ../cython/imc_termite.pxd ../cython/py_imc_termite.cpp prepdist: ../cython/py_imc_termite.pyx ../cython/imc_termite.pxd ../cython/py_imc_termite.cpp
cp -v $? ./ cp -v $? ./
cp -v $(shell ls ../lib/imc_*.hpp) ./ cp -v $(shell ls ../lib/imc_*.hpp) ./
tail -n 212 ../README.md > ./README.md tail -n 212 ../README.md > ./README.md
cp -v ../LICENSE ./ cp -v ../LICENSE ./
sdist: prepdist
python3 setup.py sdist python3 setup.py sdist
# TODO use manylinux wheel to avoid ERROR "unsupported platform tag 'linux_x86_64'"
# see: - https://github.com/pypa/manylinux
bdist: prepdist
python3 setup.py bdist_wheel
# authentication: # authentication:
# - username: __token__ # - username: __token__
# - password: <token value including pypi-prefix> # - password: <token value including pypi-prefix>

View File

@ -18,7 +18,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setup( setup(
name="IMCtermite", name="IMCtermite",
version="1.2.9", version="1.2.10",
author="Record Evolution GmbH", author="Record Evolution GmbH",
author_email="mario.fink@record-evolution.de", author_email="mario.fink@record-evolution.de",
maintainer="Record Evolution GmbH", maintainer="Record Evolution GmbH",