| 1 |
SHELL = /bin/bash -e |
| 2 |
|
| 3 |
utest: |
| 4 |
PYTHONPATH=.:${PYTHONPATH} py.test -s -v test/test_internal.py |
| 5 |
|
| 6 |
all: build install |
| 7 |
|
| 8 |
build: |
| 9 |
python setup.py build --executable="/usr/bin/env python" |
| 10 |
|
| 11 |
bdist: |
| 12 |
python setup.py build --executable="/usr/bin/env python" |
| 13 |
python setup.py bdist --formats=egg |
| 14 |
|
| 15 |
install: |
| 16 |
python setup.py install |
| 17 |
|
| 18 |
develop: |
| 19 |
python setup.py develop |
| 20 |
|
| 21 |
clean: |
| 22 |
rm -rf build/;\ |
| 23 |
find . -name "*.egg-info" | xargs rm -rf;\ |
| 24 |
find . -name "*.pyc" | xargs rm -rf;\ |
| 25 |
rm -rf dist/ |
| 26 |
|
| 27 |
test: tests |
| 28 |
check: tests |
| 29 |
tests: cram-tests py-tests extra-tests |
| 30 |
|
| 31 |
cram-tests: |
| 32 |
cram --xunit-file=cramtests.xml test/cram/*.t |
| 33 |
|
| 34 |
long-tests: |
| 35 |
cram test/cram/long_running/*.t |
| 36 |
|
| 37 |
py-tests: |
| 38 |
# pytest --cov=kineticsTools # does not quite work since we run in test/ dir. |
| 39 |
cd test/; pytest -s -v -p no:warnings -n auto --dist=loadscope --durations=20 --junitxml=../nosetests.xml --cov-report=xml:../coverage.xml test_*.py |
| 40 |
|
| 41 |
extra-tests: |
| 42 |
#cram --xunit-file=cramtests-extra.xml test/cram/extra/*.t |
| 43 |
# TODO: Fix chemistry and re-enable this test. |
| 44 |
|
| 45 |
pylint: |
| 46 |
pylint --errors-only --extension-pkg-whitelist=numpy,scipy --ignored-modules=numpy,scipy --ignored-classes=numpy,scipy kineticsTools |
| 47 |
|
| 48 |
pip-install: |
| 49 |
@which pip > /dev/null |
| 50 |
@pip freeze|grep 'kineticsTools=='>/dev/null \ |
| 51 |
&& ( pip uninstall -y kineticsTools \ |
| 52 |
|| pip uninstall -y pbtools.kineticsTools ) \ |
| 53 |
|| true |
| 54 |
@pip install --no-index \ |
| 55 |
--install-option="--install-data=$(DATA)" \ |
| 56 |
--install-option="--install-scripts=$(PREFIX)/bin" \ |
| 57 |
./ |
| 58 |
|
| 59 |
.PHONY: tests test clean cram-tests unit-tests |
| 60 |
.PHONY: clean |