From 5e93ed0706c3901628b45c4c5120dec9f696d984 Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Wed, 1 Sep 2021 10:58:42 +0200 Subject: [PATCH] * version 1.2.10 * makefile: versioning and tags: properly deal with multiple digits version tags * setup.py: support both sdist and bdist pip wheels --- cython/setup.py | 2 +- makefile | 8 ++++---- pip/makefile | 12 ++++++++++-- pip/setup.py | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/cython/setup.py b/cython/setup.py index e804ba8..d781d98 100644 --- a/cython/setup.py +++ b/cython/setup.py @@ -15,7 +15,7 @@ extensions = Extension( setup( name="imc_termite", - version='1.2.9', + version='1.2.10', description='IMCtermite cython extension', author='Record Evolution GmbH', author_email='mario.fink@record-evolution.de', diff --git a/makefile b/makefile index 558b170..266bb57 100644 --- a/makefile +++ b/makefile @@ -20,10 +20,10 @@ CC = g++ -std=c++17 OPT = -O3 -Wall -Werror -Wunused-variable -Wsign-compare # 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) -RTAG := v$(shell cat pip/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]") +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]{1,2}") # define install location INST := /usr/local/bin @@ -99,7 +99,7 @@ cython-clean : # pip pip-release: check-vtag $(RTAG) cython-build - cd ./pip/ && make publish + cd ./pip/ && make publish-source #-----------------------------------------------------------------------------# # clean diff --git a/pip/makefile b/pip/makefile index ea6f36d..b24f4bf 100644 --- a/pip/makefile +++ b/pip/makefile @@ -2,15 +2,23 @@ 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 $(shell ls ../lib/imc_*.hpp) ./ tail -n 212 ../README.md > ./README.md cp -v ../LICENSE ./ + +sdist: prepdist 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: # - username: __token__ # - password: diff --git a/pip/setup.py b/pip/setup.py index 0ba4bbe..0bc8795 100644 --- a/pip/setup.py +++ b/pip/setup.py @@ -18,7 +18,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setup( name="IMCtermite", - version="1.2.9", + version="1.2.10", author="Record Evolution GmbH", author_email="mario.fink@record-evolution.de", maintainer="Record Evolution GmbH",