* github-actions: install missing cython package for creating sdist wheel

* remove VERSION from gitignore and keep VERSION file
This commit is contained in:
Mario Fink 2021-09-21 15:56:24 +02:00
parent 71a39e90e4
commit a099849caa
5 changed files with 24 additions and 13 deletions

View File

@ -30,6 +30,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install cython
run: python -m pip install cython==0.29.24
- name: Build sdist
run: python setup.py sdist
working-directory: python/

1
.gitignore vendored
View File

@ -35,7 +35,6 @@ pip/build/
python/README.md
python/LICENSE
python/VERSION
python/build
python/*.egg-info
python/dist

View File

@ -18,8 +18,9 @@ CC = g++ -std=c++17
OPT = -O3 -Wall -Wconversion -Wpedantic -Werror -Wunused-variable -Wsign-compare
# determine git version/commit and release tag
GTAG := $(shell git tag -l --sort=version:refname | tail -n1)
GTAG := $(shell git tag -l --sort=version:refname | tail -n1 | sed "s/$^v//g")
GHSH := $(shell git rev-parse HEAD | head -c8)
GVSN := $(shell cat python/VERSION | tr -d ' \n')
# current timestamp
TMS = $(shell date +%Y%m%dT%H%M%S)
@ -31,7 +32,7 @@ INST := /usr/local/bin
# C++ and CLI tool
# build exectuable
$(EXE) : main.o
$(EXE): check-tags $(GVSN) main.o
$(CC) $(OPT) main.o -o $@
# build main.cpp and include git version/commit tag
@ -59,6 +60,17 @@ cpp-clean :
check-code:
cppcheck --enable=all -I lib/ src/main.cpp
#-----------------------------------------------------------------------------#
# versions
$(GTAG):
@echo "consistent versions check successful: building $(GTAG)"
check-tags:
@echo "latest git tag: $(GTAG)"
@echo "latest git hash: $(GHSH)"
@echo "python version: $(GVSN)"
#-----------------------------------------------------------------------------#
# Docker
@ -71,7 +83,7 @@ docker-run:
#-----------------------------------------------------------------------------#
# python
python-build:
python-build: check-tags $(GVSN)
make -C python/ build-inplace
cp python/IMCtermite*.so ./ -v

1
python/VERSION Normal file
View File

@ -0,0 +1 @@
2.0.0

View File

@ -1,14 +1,11 @@
GITAG := $(shell git tag -l --sort=version:refname | tail -n1 | sed 's/^v//g')
setup:
echo $(GITAG) > VERSION
cat ../README.md | grep '^# IMCtermite' -A 50000 > ./README.md
cp -r ../lib ./
cp -v ../LICENSE ./
setup-clean:
rm -vf README.md VERSION LICENSE
rm -vf README.md LICENSE
rm -rf lib/
build: setup