-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
43 lines (32 loc) · 1.05 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
IN_VENV=. venv/bin/activate
# create venv
venv:
python3 -m venv venv
$(IN_VENV) ; pip install -U pip setuptools wheel
# install dependencies
.PHONY: deps
deps: venv/deps
venv/deps: venv requirements.txt requirements-dev.txt
$(IN_VENV) ; pip install -Ur requirements.txt
$(IN_VENV) ; pip install -Ur requirements-dev.txt
@touch $(@)
# install typical checker script dependencies
deps-script: venv/deps venv/deps-script
venv/deps-script: venv requirements-script.txt
$(IN_VENV) ; pip install -Ur requirements-script.txt
@touch $(@)
# check project integrity
check: check-mypy
check-mypy: deps
#TODO add --disallow-untyped-defs at some point
$(IN_VENV) ; mypy --config-file mypy.ini --no-incremental checker_runner controlserver gamelib saarctf_commons scripts tests vpn vpnboard
# run all the unittests
.PHONY: test
test: deps
$(IN_VENV) ; python3 -m unittest tests/test_*.py
# cleanup everything including venv
.PHONY: clean
clean:
rm -rf venv
rm -rf .mypy_cache
find . -ignore_readdir_race -type d -name __pycache__ -exec rm -rf {} \; 2>/dev/null || true