-
Notifications
You must be signed in to change notification settings - Fork 313
/
Makefile
54 lines (44 loc) · 1.39 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
46
47
48
49
50
51
52
53
54
NAME=SpiffWorkflow
VERSION=`python setup.py --version`
PREFIX=/usr/local/
BIN_DIR=$(PREFIX)/bin
SITE_DIR=$(PREFIX)`python -c "import sys; from distutils.sysconfig import get_python_lib; print(get_python_lib()[len(sys.prefix):])"`
###################################################################
# Standard targets.
###################################################################
.PHONY : clean
clean:
find . -name "*.pyc" -o -name "*.pyo" | xargs -rn1 rm -f
find . -name "*.egg-info" | xargs -rn1 rm -r
rm -Rf build
cd doc; make clean
.PHONY : dist-clean
dist-clean: clean
rm -Rf dist
.PHONY : doc
doc:
cd doc; make html
.PHONY : tests
tests:
python -m unittest discover -vs tests/SpiffWorkflow -p \*Test.py -t .
.PHONY : tests-par
tests-par:
@if ! command -v unittest-parallel >/dev/null 2>&1; then \
echo "unittest-parallel not found. Please install it with:"; \
echo " pip install unittest-parallel"; \
exit 1; \
fi
unittest-parallel --module-fixtures -qbs tests/SpiffWorkflow -p \*Test.py -t .
.PHONY : tests-cov
tests-cov:
cd tests/$(NAME)
coverage run --source=$(NAME) -m unittest discover -v . "*Test.py"
.PHONY : tests-ind
tests-ind:
cd tests/$(NAME)
@PYTHONPATH=../.. find . -name "*Test.py" -printf '%p' -exec python -m unittest {} \;
.PHONY : tests-timing
tests-timing:
@make tests-ind 2>&1 | ./scripts/test_times.py
wheel: clean
python -m build --sdist --wheel --outdir dist/