work on packaging

This commit is contained in:
Sylvain Tricot 2019-11-16 00:38:17 +01:00
parent 960a954e02
commit a3469c53df
6 changed files with 10 additions and 9 deletions

View File

@ -1,10 +1,12 @@
MAKESELF:=makeself
LICENSE:=$(shell cat ./license.txt)
VERSION:=$(shell cd src && python -c "import msspec; print(msspec.__version__)")
#VERSION:=$(shell cd src && python -c "import msspec; print(msspec.__version__)")
VERSION:=$(shell git describe|sed 's/-\([[:digit:]]\+\)-.*/post\1/')
SETUPFILE:=pymsspec-$(VERSION).setup
.PHONY: clean purge version
clean:
@rm -rf *.setup
@ -20,5 +22,6 @@ purge: clean
selfex: purge
@echo "Creating the self-extractible setup program... "
@echo "__version__ = \"$(VERSION)\"" > ./src/msspec/version.py
$(MAKESELF) --license "$(LICENSE)" ./src $(SETUPFILE) "Python MsSpec" ./install.sh

View File

@ -1 +0,0 @@
MsSpec-1.6

0
src/install.sh Normal file → Executable file
View File

View File

@ -1,3 +1,2 @@
# Auto-generated file, do not edit
__version__ = "1.6"
from .version import __version__
__sha__ = "$Id$"

View File

@ -1,3 +1,2 @@
# Auto-generated file, do not edit
__version__ = "1.6"
from ..version import __version__
__sha__ = "$Id$"

View File

@ -14,8 +14,8 @@ pybinding: libspec.so
libspec.so: $(objects) main.f
@echo "building Python binding..."
@f2py3 -I. $(objects) -c -m libspec main.f
#f2py3 -I. $(objects) --debug-capi --debug -c -m libspec main.f
#@f2py3 -I. $(objects) -c -m libspec main.f
@f2py3 -I. $(objects) --debug-capi --debug -c -m libspec main.f
@cp libspec.cpython*.so ../
@mv libspec.cpython*.so libspec.so
@ -28,7 +28,8 @@ exe: $(objects) prog.f
$(objects): $(objects_src)
@echo "compiling subroutines and functions..."
#$(COMP) -cpp -fPIC -O2 -ffast-math -mcmodel=large -fdefault-real-4 -c $^
@$(COMP) $(OPTS) -fPIC -mcmodel=large -c $^
#@$(COMP) $(OPTS) -fPIC -mcmodel=large -c $^
@$(COMP) $(OPTS) -fPIC -c $^
clean:
@echo "cleaning..."