2019-11-15 11:16:06 +01:00
|
|
|
MAKESELF:=makeself
|
2019-11-21 17:09:19 +01:00
|
|
|
#LICENSE:=$(cat ./license.txt)
|
2019-11-16 00:38:17 +01:00
|
|
|
#VERSION:=$(shell cd src && python -c "import msspec; print(msspec.__version__)")
|
2019-11-18 00:37:34 +01:00
|
|
|
VERSION:=$(shell git describe|sed 's/-\([[:digit:]]\+\)-.*/\.post\1/')
|
2019-11-21 17:09:19 +01:00
|
|
|
SETUPFILE:=MsSpec-$(VERSION).setup
|
2019-11-15 11:16:06 +01:00
|
|
|
|
2019-11-21 17:09:19 +01:00
|
|
|
.PHONY: clean purge version selfex
|
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:
|
2019-11-20 18:14:00 +01:00
|
|
|
@echo "Cleaning all..."
|
2019-11-21 17:09:19 +01:00
|
|
|
@find ./src -type f -name '*.pyc' -exec rm -f {} +
|
|
|
|
@find ./src -type d -name '__pycache__' -exec rm -rf {} +
|
2019-11-20 18:14:00 +01:00
|
|
|
+$(MAKE) -C src/ clean
|
|
|
|
+$(MAKE) -C doc/ clean
|
2019-11-15 11:16:06 +01:00
|
|
|
|
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..."
|
2019-11-20 18:14:00 +01:00
|
|
|
@rm -rf *.setup
|
|
|
|
+$(MAKE) -C src/ purge
|
2019-11-15 11:16:06 +01:00
|
|
|
|
2019-11-21 17:09:19 +01:00
|
|
|
selfex:
|
2019-11-15 11:16:06 +01:00
|
|
|
@echo "Creating the self-extractible setup program... "
|
2019-11-18 17:33:32 +01:00
|
|
|
# update the version
|
2019-11-17 23:28:53 +01:00
|
|
|
@cp ./src/msspec/version.py ./src/msspec/version.py.bak
|
2019-11-16 00:38:17 +01:00
|
|
|
@echo "__version__ = \"$(VERSION)\"" > ./src/msspec/version.py
|
2019-11-18 17:33:32 +01:00
|
|
|
# create the *.lsm file
|
2019-11-21 17:09:19 +01:00
|
|
|
@echo "Begin4" > msspec.lsm
|
|
|
|
@echo "Title: Python MsSpec" >> msspec.lsm
|
|
|
|
@echo "Version: $(VERSION)" >> msspec.lsm
|
|
|
|
@echo "Entered-date: `date +%Y-%m-%d`" >> msspec.lsm
|
|
|
|
@echo "Description: A multiple scattering package for spectroscopies using electrons to probe materials" >> msspec.lsm
|
|
|
|
@echo "Keywords: " >> msspec.lsm
|
|
|
|
@echo "Author: sylvain.tricot@univ-rennes1.fr (Sylvain Tricot), didier.sebilleau@univ-rennes1.fr (Didier Sébilleau)" >> msspec.lsm
|
|
|
|
@echo "Maintained-by: sylvain.tricot@univ-rennes1.fr (Sylvain Tricot)" >> msspec.lsm
|
|
|
|
@echo "Primary-site: https://msspec.cnrs.fr" >> msspec.lsm
|
|
|
|
@echo "Alternate-site:" >> msspec.lsm
|
|
|
|
@echo "Original-site:" >> msspec.lsm
|
|
|
|
@echo "Platforms:" >> msspec.lsm
|
|
|
|
@echo "Copying-policy: Gnu Library General Public License (GLPL) 2.0" >> msspec.lsm
|
|
|
|
@echo "End" >> msspec.lsm
|
|
|
|
$(MAKESELF) --license "./license.txt" --lsm ./msspec.lsm ./src $(SETUPFILE) "Python MsSpec" ./install.sh
|
2019-11-17 23:28:53 +01:00
|
|
|
@mv ./src/msspec/version.py.bak ./src/msspec/version.py
|
2019-11-21 17:09:19 +01:00
|
|
|
@rm ./msspec.lsm
|
2019-11-15 11:16:06 +01:00
|
|
|
|