-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
31 lines (30 loc) · 931 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
INSTALL_PATH = /usr/local
PYTHON = python3
VERSION = $(shell python3 -c "import ndd; print(ndd.__version__)")
.PHONY: default build install dev_install test clean veryclean f2py timings dist ta
default:
make dev_install; make test
build:
$(PYTHON) setup.py build
install:
make veryclean; make f2py; pip3 install .
dev_install:
make veryclean; make f2py; pip3 install -e .
test:
(cd tests; pytest)
clean:
$(RM) ndd/exts/*.o ndd/exts/*.mod ndd/fnsb*
veryclean:
make clean
$(RM) -- **/*~
$(RM) -- **/*#
$(RM) -r .tox .cache .pytest_cache .libs __pycache__ ndd.egg-info dist build ndd/__pycache__
pip3 uninstall ndd
f2py:
(cd ndd/exts; $(RM) nsb.pyf; f2py estimators.f90 -m fnsb -h nsb.pyf; mv nsb.pyf ../)
timings:
$(PYTHON) utils/timings.py
dist:
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then (echo "run `make dist` only in master branch"; exit 1); fi
$(RM) -f dist/*
$(PYTHON) setup.py sdist