-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
50 lines (35 loc) · 886 Bytes
/
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
# This Makefile requires the following commands to be available:
# * python3.6
DEPS=requirements.txt
PIP="venv/bin/pip"
TOX="venv/bin/tox"
PYTHON="venv/bin/python"
TOX_PY_LIST="$(shell $(TOX) -l | grep ^py | xargs | sed -e 's/ /,/g')"
.PHONY: clean pyclean test lint isort format docker
tox: venv
$(TOX)
pyclean:
@find . -name *.pyc -delete
@rm -rf *.egg-info build
@rm -rf coverage.xml .coverage
clean: pyclean
@rm -rf venv
check_dependency_tree: venv
@$(PIP) check
venv:
@python3.6 -m venv venv
@$(PIP) install -U "pip>=7.0" -q
@$(PIP) install -r $(DEPS)
@$(PIP) install -e .
test: clean tox check_dependency_tree
test/%: venv pyclean
$(TOX) -e $(TOX_PY_LIST) -- $*
lint: venv
@$(TOX) -e lint,isort-check,black-check
isort: venv
@$(TOX) -e isort-fix
format: venv
@$(TOX) -e isort-fix,black-fix
build: clean venv tox
changelog: venv
venv/bin/gitchangelog