* github-actions: install missing cython package for creating sdist wheel
* remove VERSION from gitignore and keep VERSION file
This commit is contained in:
parent
71a39e90e4
commit
a099849caa
2
.github/workflows/pypi-deploy.yml
vendored
2
.github/workflows/pypi-deploy.yml
vendored
@ -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
1
.gitignore
vendored
@ -35,7 +35,6 @@ pip/build/
|
||||
|
||||
python/README.md
|
||||
python/LICENSE
|
||||
python/VERSION
|
||||
python/build
|
||||
python/*.egg-info
|
||||
python/dist
|
||||
|
28
makefile
28
makefile
@ -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,11 +32,11 @@ 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
|
||||
main.o : src/main.cpp $(HPP)
|
||||
main.o: src/main.cpp $(HPP)
|
||||
@cp $< $<.cpp
|
||||
@sed -i 's/TAGSTRING/$(GTAG)/g' $<.cpp
|
||||
@sed -i 's/HASHSTRING/$(GHSH)/g' $<.cpp
|
||||
@ -43,13 +44,13 @@ main.o : src/main.cpp $(HPP)
|
||||
$(CC) -c $(OPT) -I $(LIB) $<.cpp -o $@
|
||||
@rm $<.cpp
|
||||
|
||||
install : $(EXE)
|
||||
install: $(EXE)
|
||||
cp $< $(INST)/
|
||||
|
||||
uninstall : $(INST)/$(EXE)
|
||||
uninstall: $(INST)/$(EXE)
|
||||
rm $<
|
||||
|
||||
cpp-clean :
|
||||
cpp-clean:
|
||||
rm -vf $(EXE)
|
||||
rm -vf *.o
|
||||
|
||||
@ -59,10 +60,21 @@ 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
|
||||
|
||||
docker-build :
|
||||
docker-build:
|
||||
docker build ./ --tag imctermite:0.1
|
||||
|
||||
docker-run:
|
||||
@ -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
1
python/VERSION
Normal file
@ -0,0 +1 @@
|
||||
2.0.0
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user