msspec_python3/src/Makefile

48 lines
1.3 KiB
Makefile
Raw Normal View History

2019-11-15 11:16:06 +01:00
VERSION:=$(shell python -c "import msspec; print(msspec.__version__)")
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
@pip install dist/msspec-$(VERSION).tar.gz $(SUPPRESS_OUPUT)
2019-11-15 11:16:06 +01:00
sdist: pybinding
@echo "Creating Python source distribution..."
@python setup.py sdist $(SUPPRESS_OUPUT)
2019-11-15 11:16:06 +01:00
pybinding:
@echo "Building Python binding for phagen and spec..."
@+$(MAKE) -C msspec/spec/fortran pybinding $(SUPPRESS_OUPUT)
@+$(MAKE) -C msspec/phagen/fortran pybinding $(SUPPRESS_OUPUT)
results: pybinding
@echo "Generating results for unittests"
@python -c "from msspec.tests import create_tests_results; create_tests_results()" $(SUPPRESS_OUPUT)
tests: pybinding
@echo "Runing unittests"
# @python -c "from msspec.tests import run_tests; run_tests()" 1>/dev/null
@coverage run --source=./ --omit=msspec/es/*,msspec/msspecgui/* msspec/tests.py 1>/dev/null
# create the html coverage report
# @mv .coverage ../doc/source
@coverage html -d ../doc/source/htmlcov
@rm .coverage
2019-11-15 11:16:06 +01:00
clean:
@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*
help:
@echo "help message"