2020-08-06 17:31:06 -04:00
|
|
|
# By default, run the tests.
|
2013-08-07 20:19:39 -04:00
|
|
|
all: test
|
|
|
|
|
2020-08-06 17:31:06 -04:00
|
|
|
version:
|
|
|
|
python3 setup.py version
|
|
|
|
|
|
|
|
build:
|
|
|
|
python3 setup.py build_ext --inplace
|
|
|
|
|
|
|
|
dist: sdist
|
|
|
|
sdist:
|
|
|
|
python3 setup.py sdist
|
|
|
|
|
|
|
|
install:
|
|
|
|
python3 setup.py install
|
|
|
|
|
|
|
|
develop:
|
|
|
|
python3 setup.py develop
|
|
|
|
|
|
|
|
ctrl: flake
|
|
|
|
flake:
|
|
|
|
flake8 nilmtools
|
|
|
|
lint:
|
|
|
|
pylint3 --rcfile=setup.cfg nilmtools
|
|
|
|
|
2013-08-07 20:19:39 -04:00
|
|
|
test:
|
2020-08-04 10:42:00 -04:00
|
|
|
ifneq ($(INSIDE_EMACS),)
|
|
|
|
# Use the slightly more flexible script
|
|
|
|
python3 setup.py build_ext --inplace
|
|
|
|
python3 tests/runtests.py
|
2013-03-19 17:54:59 -04:00
|
|
|
else
|
2020-08-04 10:42:00 -04:00
|
|
|
# Let setup.py check dependencies, build stuff, and run the test
|
|
|
|
python3 setup.py nosetests
|
2013-03-19 17:54:59 -04:00
|
|
|
endif
|
2013-03-19 15:41:20 -04:00
|
|
|
|
2013-03-11 18:06:55 -04:00
|
|
|
clean::
|
2020-08-06 17:31:06 -04:00
|
|
|
find . -name '*.pyc' -o -name '__pycache__' -print0 | xargs -0 rm -rf
|
|
|
|
rm -f .coverage
|
|
|
|
rm -rf nilmtools.egg-info/ build/ .eggs
|
2013-03-11 18:06:55 -04:00
|
|
|
|
|
|
|
gitclean::
|
|
|
|
git clean -dXf
|
|
|
|
|
2020-08-06 17:31:06 -04:00
|
|
|
.PHONY: all version dist sdist install test
|
|
|
|
.PHONY: ctrl lint flake clean gitclean
|