2013-02-04 18:14:44 -05:00
|
|
|
# By default, run the tests.
|
2013-08-05 12:16:47 -04:00
|
|
|
all: test
|
2012-04-03 14:01:56 -04:00
|
|
|
|
2013-02-05 18:49:07 -05:00
|
|
|
version:
|
2019-07-25 10:32:58 -04:00
|
|
|
python3 setup.py version
|
2013-02-05 18:49:07 -05:00
|
|
|
|
2013-02-04 18:14:44 -05:00
|
|
|
build:
|
2019-07-25 10:32:58 -04:00
|
|
|
python3 setup.py build_ext --inplace
|
2013-02-04 18:14:44 -05:00
|
|
|
|
|
|
|
dist: sdist
|
|
|
|
sdist:
|
2019-07-25 10:32:58 -04:00
|
|
|
python3 setup.py sdist
|
2013-02-04 18:14:44 -05:00
|
|
|
|
|
|
|
install:
|
2019-07-25 10:32:58 -04:00
|
|
|
python3 setup.py install
|
2013-02-04 18:14:44 -05:00
|
|
|
|
2013-03-05 20:24:47 -05:00
|
|
|
develop:
|
2019-07-25 10:32:58 -04:00
|
|
|
python3 setup.py develop
|
2013-03-05 20:24:47 -05:00
|
|
|
|
2013-02-04 18:14:44 -05:00
|
|
|
docs:
|
|
|
|
make -C docs
|
|
|
|
|
2019-08-30 16:02:46 -04:00
|
|
|
ctrl: flake
|
|
|
|
flake:
|
|
|
|
flake8 nilmdb
|
2012-03-23 11:50:33 -04:00
|
|
|
lint:
|
2019-08-30 16:02:46 -04:00
|
|
|
pylint3 --rcfile=setup.cfg nilmdb
|
2012-03-23 11:50:33 -04:00
|
|
|
|
|
|
|
test:
|
2019-07-25 10:32:58 -04:00
|
|
|
ifneq ($(INSIDE_EMACS),)
|
2013-02-26 21:55:46 -05:00
|
|
|
# Use the slightly more flexible script
|
2019-07-25 10:32:58 -04:00
|
|
|
python3 setup.py build_ext --inplace
|
|
|
|
python3 tests/runtests.py
|
2013-02-26 21:55:46 -05:00
|
|
|
else
|
|
|
|
# Let setup.py check dependencies, build stuff, and run the test
|
2019-07-25 10:32:58 -04:00
|
|
|
python3 setup.py nosetests
|
2013-02-26 21:55:46 -05:00
|
|
|
endif
|
2012-01-22 19:40:48 -05:00
|
|
|
|
2012-02-20 01:13:54 -05:00
|
|
|
clean::
|
2019-08-23 15:24:33 -04:00
|
|
|
find . -name '*.pyc' -o -name '__pycache__' -print0 | xargs -0 rm -rf
|
2012-02-20 01:13:54 -05:00
|
|
|
rm -f .coverage
|
2012-03-20 10:22:02 -04:00
|
|
|
rm -rf tests/*testdb*
|
2019-08-29 14:46:31 -04:00
|
|
|
rm -rf nilmdb.egg-info/ build/ nilmdb/server/*.so
|
2013-02-04 18:14:44 -05:00
|
|
|
make -C docs clean
|
|
|
|
|
2013-02-04 22:15:12 -05:00
|
|
|
gitclean::
|
|
|
|
git clean -dXf
|
|
|
|
|
2019-08-30 16:02:46 -04:00
|
|
|
.PHONY: all version build dist sdist install docs test
|
|
|
|
.PHONY: ctrl lint flake clean gitclean
|