2013-07-05 16:47:50 -04:00
|
|
|
# By default, run the tests.
|
|
|
|
all: test
|
2013-07-02 11:16:44 -04:00
|
|
|
|
|
|
|
version:
|
2020-08-03 16:50:22 -04:00
|
|
|
python3 setup.py version
|
2013-07-02 11:16:44 -04:00
|
|
|
|
2013-07-05 16:47:50 -04:00
|
|
|
build:
|
2020-08-03 16:50:22 -04:00
|
|
|
python3 setup.py build_ext --inplace
|
2013-07-05 16:47:50 -04:00
|
|
|
|
2013-07-02 11:16:44 -04:00
|
|
|
dist: sdist
|
|
|
|
sdist:
|
2020-08-03 16:50:22 -04:00
|
|
|
python3 setup.py sdist
|
2013-07-02 11:16:44 -04:00
|
|
|
|
|
|
|
install:
|
2020-08-03 16:50:22 -04:00
|
|
|
python3 setup.py install
|
2013-07-02 11:16:44 -04:00
|
|
|
|
|
|
|
develop:
|
2020-08-03 16:50:22 -04:00
|
|
|
python3 setup.py develop
|
2013-07-02 11:16:44 -04:00
|
|
|
|
2013-07-05 16:47:50 -04:00
|
|
|
docs:
|
|
|
|
make -C docs
|
|
|
|
|
2020-08-03 23:46:34 -04:00
|
|
|
ctrl: flake
|
|
|
|
flake:
|
|
|
|
flake8 nilmrun
|
2013-07-05 16:47:50 -04:00
|
|
|
lint:
|
2020-08-03 23:46:34 -04:00
|
|
|
pylint3 --rcfile=setup.cfg nilmrun
|
2013-07-05 16:47:50 -04:00
|
|
|
|
|
|
|
test:
|
2020-08-03 16:50:22 -04:00
|
|
|
ifneq ($(INSIDE_EMACS),)
|
2013-07-05 16:47:50 -04:00
|
|
|
# Use the slightly more flexible script
|
2020-08-03 16:50:22 -04:00
|
|
|
python3 setup.py build_ext --inplace
|
|
|
|
python3 tests/runtests.py
|
2013-07-05 16:47:50 -04:00
|
|
|
else
|
|
|
|
# Let setup.py check dependencies, build stuff, and run the test
|
2020-08-03 16:50:22 -04:00
|
|
|
python3 setup.py nosetests
|
2013-07-05 16:47:50 -04:00
|
|
|
endif
|
|
|
|
|
2013-07-02 11:16:44 -04:00
|
|
|
clean::
|
2020-08-03 23:46:34 -04:00
|
|
|
find . -name '*.pyc' -o -name '__pycache__' -print0 | xargs -0 rm -rf
|
2013-07-05 16:47:50 -04:00
|
|
|
rm -f .coverage
|
2020-08-03 23:46:34 -04:00
|
|
|
rm -rf nilmrun.egg-info/ build/
|
2013-07-05 16:47:50 -04:00
|
|
|
make -C docs clean
|
2013-07-02 11:16:44 -04:00
|
|
|
|
|
|
|
gitclean::
|
|
|
|
git clean -dXf
|
|
|
|
|
2020-08-03 23:46:34 -04:00
|
|
|
.PHONY: all version dist sdist install docs test
|
|
|
|
.PHONY: ctrl lint flake clean gitclean
|