2020-11-24 09:57:35 +01:00
|
|
|
include options.mk
|
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
.PHONY: sdist frontend pybinding results clean
|
2020-12-02 08:49:59 +01:00
|
|
|
|
|
|
|
|
2020-12-02 18:18:47 +01:00
|
|
|
sdist: dist/msspec-$(VERSION).tar.gz
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2020-12-02 18:18:47 +01:00
|
|
|
|
|
|
|
frontend: $(INSTALL_PREFIX)/bin/msspec
|
|
|
|
|
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
dist/msspec-$(VERSION).tar.gz: VERSION
|
2020-12-02 08:49:59 +01:00
|
|
|
@echo "Creating Python source distribution..."
|
2022-10-27 14:45:38 +02:00
|
|
|
@+$(INSIDE_VENV) pip install build
|
|
|
|
@+$(INSIDE_VENV) $(PYTHON_EXE) -m build
|
2020-12-02 08:49:59 +01:00
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
|
|
|
$(INSTALL_PREFIX)/bin/msspec: msspec.sh.template VERSION
|
|
|
|
@echo "Installing frontend command..."
|
2021-01-22 17:03:53 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2022-10-27 14:45:38 +02:00
|
|
|
@cat $< | sed -e 's#__VENV_PATH__#$(VENV_PATH)#' > $@
|
2021-01-22 17:31:46 +01:00
|
|
|
@chmod 755 $@
|
2020-12-02 18:18:47 +01:00
|
|
|
|
2020-11-24 09:57:35 +01:00
|
|
|
|
|
|
|
pybinding:
|
|
|
|
@echo "Building Python binding for phagen and spec..."
|
|
|
|
@+$(MAKE) -C msspec/phagen/fortran all
|
|
|
|
@+$(MAKE) -C msspec/spec/fortran all
|
2020-12-02 18:18:47 +01:00
|
|
|
@echo "$(VERSION)" > VERSION
|
2020-11-24 09:57:35 +01:00
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2020-11-24 09:57:35 +01:00
|
|
|
results: msspec/results.txt
|
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2020-11-24 09:57:35 +01:00
|
|
|
msspec/results.txt: pybinding
|
|
|
|
@echo "Generating results for unittests"
|
|
|
|
@coverage run --source=./ --omit=msspec/es/*,msspec/msspecgui/* msspec/create_tests_results.py
|
|
|
|
# create the html coverage report
|
|
|
|
@coverage html -d ../doc/source/htmlcov
|
|
|
|
@rm .coverage
|
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2020-11-24 09:57:35 +01:00
|
|
|
tests: pybinding
|
|
|
|
@echo "Runing unittests"
|
|
|
|
@python -m msspec.tests 1>/dev/null
|
|
|
|
|
2021-01-12 12:20:13 +01:00
|
|
|
|
2020-11-30 16:39:29 +01:00
|
|
|
clean::
|
2020-11-24 09:57:35 +01:00
|
|
|
@echo "Cleaning all..."
|
|
|
|
@find ./ -type f -name '*.pyc' -exec rm -f {} +
|
|
|
|
@find ./ -type d -name '__pycache__' -exec rm -rf {} +
|
|
|
|
@+$(MAKE) -C msspec/spec/fortran clean
|
|
|
|
@+$(MAKE) -C msspec/phagen/fortran clean
|
|
|
|
# remove previous sdist
|
|
|
|
@rm -rf dist
|
|
|
|
@rm -rf *.egg*
|
2021-03-22 08:36:26 +01:00
|
|
|
@rm -f VERSION
|
2020-11-24 09:57:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
help:
|
2021-01-13 18:26:08 +01:00
|
|
|
@echo "SRC Makefile help message"
|
2020-11-24 09:57:35 +01:00
|
|
|
|