30 lines
846 B
Makefile
30 lines
846 B
Makefile
MAKESELF:=makeself
|
|
LICENSE:=$(shell cat ./license.txt)
|
|
#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
|
|
|
|
version:
|
|
@python ./CI/update_version.py
|
|
|
|
|
|
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... "
|
|
@cp ./src/msspec/version.py ./src/msspec/version.py.bak
|
|
@echo "__version__ = \"$(VERSION)\"" > ./src/msspec/version.py
|
|
$(MAKESELF) --license "$(LICENSE)" ./src $(SETUPFILE) "Python MsSpec" ./install.sh
|
|
@mv ./src/msspec/version.py.bak ./src/msspec/version.py
|
|
|