2019-11-15 11:16:06 +01:00
|
|
|
VERSION:=$(shell python -c "import msspec; print(msspec.__version__)")
|
|
|
|
|
2019-11-28 18:35:37 +01:00
|
|
|
VERBOSE:=0
|
|
|
|
ifeq ($(VERBOSE),0)
|
|
|
|
SUPPRESS_OUPUT:=1>/dev/null 2>/dev/null
|
|
|
|
MAKEFLAGS += --no-print-directory --silent
|
|
|
|
else
|
|
|
|
SUPPRESS_OUPUT:=
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2019-11-15 11:16:06 +01:00
|
|
|
install: sdist
|
2019-11-28 18:35:37 +01:00
|
|
|
@pip install dist/msspec-$(VERSION).tar.gz $(SUPPRESS_OUPUT)
|
2019-11-15 11:16:06 +01:00
|
|
|
|
|
|
|
sdist: pybinding
|
2019-11-28 18:35:37 +01:00
|
|
|
@echo "Creating Python source distribution..."
|
|
|
|
@python setup.py sdist $(SUPPRESS_OUPUT)
|
2019-11-15 11:16:06 +01:00
|
|
|
|
|
|
|
pybinding:
|
2019-11-28 18:35:37 +01:00
|
|
|
@echo "Building Python binding for phagen and spec..."
|
|
|
|
@+$(MAKE) -C msspec/spec/fortran pybinding $(SUPPRESS_OUPUT)
|
|
|
|
@+$(MAKE) -C msspec/phagen/fortran pybinding $(SUPPRESS_OUPUT)
|
|
|
|
|
2019-12-06 13:26:22 +01:00
|
|
|
results: msspec/results.txt
|
|
|
|
|
|
|
|
msspec/results.txt: pybinding
|
2019-11-28 18:35:37 +01:00
|
|
|
@echo "Generating results for unittests"
|
2019-11-29 18:06:59 +01:00
|
|
|
@coverage run --source=./ --omit=msspec/es/*,msspec/msspecgui/* msspec/create_tests_results.py 1>/dev/null
|
2019-11-29 17:38:41 +01:00
|
|
|
# create the html coverage report
|
|
|
|
@coverage html -d ../doc/source/htmlcov
|
|
|
|
@rm .coverage
|
2019-11-15 11:16:06 +01:00
|
|
|
|
2019-11-29 18:06:59 +01:00
|
|
|
tests: pybinding
|
|
|
|
@echo "Runing unittests"
|
|
|
|
@python -m msspec.tests 1>/dev/null
|
|
|
|
|
2019-11-15 11:16:06 +01:00
|
|
|
clean:
|
2019-11-28 18:35:37 +01:00
|
|
|
@echo "Cleaning all..."
|
|
|
|
@+$(MAKE) -C msspec/spec/fortran clean $(SUPPRESS_OUPUT)
|
|
|
|
@+$(MAKE) -C msspec/phagen/fortran clean $(SUPPRESS_OUPUT)
|
|
|
|
# remove previous sdist
|
2019-11-15 11:16:06 +01:00
|
|
|
@rm -rf dist
|
|
|
|
@rm -rf *.egg*
|
|
|
|
|
2019-11-28 18:35:37 +01:00
|
|
|
help:
|
|
|
|
@echo "help message"
|
2019-11-20 18:14:00 +01:00
|
|
|
|