forked from omaciel/fauxfactory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
45 lines (34 loc) · 1.19 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
UNITTEST_CMD ?= unit2
UNITTEST_MOD ?= unittest
UNITTEST_ARGS ?= discover --start-directory tests --top-level-directory .
help:
@echo "Please use \`make <target>' where <target> is one of:"
@echo " docs-clean Remove documentation."
@echo " docs-doctest Check code samples in the documentation."
@echo " docs-html Compile documentation to HTML."
@echo " lint Run flake8 and pylint."
@echo " test Run unit tests."
@echo " test-all Run unit tests and doctests, measure coverage."
docs-clean:
cd docs && $(MAKE) clean
docs-doctest:
cd docs && $(MAKE) doctest
docs-html:
cd docs && $(MAKE) html
lint:
flake8 .
pylint --reports=n --disable=I --ignore-imports=y fauxfactory docs/conf.py setup.py
# pylint should also lint the tests/ directory.
package:
python setup.py sdist bdist_wheel
package-clean:
rm -rf build dist fauxfactory.egg-info
publish:
python setup.py register
python setup.py sdist upload -s
python setup.py bdist_wheel upload -s
test:
$(UNITTEST_CMD) $(UNITTEST_ARGS)
test-all: lint docs-doctest
coverage run -m $(UNITTEST_MOD) $(UNITTEST_ARGS)
.PHONY: help docs-clean docs-doctest docs-html lint package package-clean publish test test-all