2019-11-15 11:16:06 +01:00
|
|
|
MAKESELF:=makeself
|
|
|
|
LICENSE:=$(shell cat ./license.txt)
|
2019-11-16 00:38:17 +01:00
|
|
|
#VERSION:=$(shell cd src && python -c "import msspec; print(msspec.__version__)")
|
|
|
|
VERSION:=$(shell git describe|sed 's/-\([[:digit:]]\+\)-.*/post\1/')
|
2019-11-15 11:16:06 +01:00
|
|
|
SETUPFILE:=pymsspec-$(VERSION).setup
|
|
|
|
|
2019-11-15 14:26:16 +01:00
|
|
|
.PHONY: clean purge version
|
2019-11-15 11:16:06 +01:00
|
|
|
|
2019-11-16 00:38:17 +01:00
|
|
|
|
2019-11-15 11:16:06 +01:00
|
|
|
clean:
|
|
|
|
@rm -rf *.setup
|
|
|
|
|
2019-11-15 14:26:16 +01:00
|
|
|
version:
|
2019-11-15 16:07:48 +01:00
|
|
|
@python ./CI/update_version.py
|
2019-11-15 14:26:16 +01:00
|
|
|
|
|
|
|
|
2019-11-15 11:16:06 +01:00
|
|
|
purge: clean
|
|
|
|
@echo "Purging all..."
|
|
|
|
@find ./src -type f -name '*.pyc' -exec rm {} +
|
|
|
|
@find ./src -type d -name '__pycache__' -exec rm -r {} +
|
|
|
|
+$(MAKE) -C src/ clean
|
|
|
|
|
|
|
|
selfex: purge
|
|
|
|
@echo "Creating the self-extractible setup program... "
|
2019-11-16 00:38:17 +01:00
|
|
|
@echo "__version__ = \"$(VERSION)\"" > ./src/msspec/version.py
|
2019-11-15 11:16:06 +01:00
|
|
|
$(MAKESELF) --license "$(LICENSE)" ./src $(SETUPFILE) "Python MsSpec" ./install.sh
|
|
|
|
|