-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathMakefile
55 lines (45 loc) · 1.69 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
55
################################
# Makefile for pyavtools #
################################
SHELL := /bin/bash
##################################### I N I T T A R G E T S #####################################
venv.marker:
python3 -m venv venv
source venv/bin/activate ; pip install --upgrade pip
source venv/bin/activate ; pip install flake8
source venv/bin/activate ; pip install black
source venv/bin/activate ; pip install pytest
source venv/bin/activate ; pip install pytest-qt
source venv/bin/activate ; pip install pytest-env
source venv/bin/activate ; pip install pytest-cov
touch venv.marker
echo -e "\nRun:\nsource venv/bin/activate"
venv: venv.marker
.PHONY: venv
init.marker: pyproject.toml
source venv/bin/activate ; pip install -e .[install]
touch init.marker
init: venv.marker init.marker
.PHONY: init
#################################### W H E E L T A R G E T S ####################################
init-build.marker: init
source venv/bin/activate ; pip install -e .[build]
touch init-build.marker
init-build: init-build.marker
.PHONY: init-build
wheel: init-build
source venv/bin/activate ; python -m build --wheel
test: init
source venv/bin/activate ; flake8 src tests --count --select=E9,F63,F7,F82 --show-source --statistics
source venv/bin/activate ; flake8 src tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
source venv/bin/activate ; pytest
.PHONY: test
clean:
rm -rfI venv || true
rm -fI extras/extras/test_results/*.html || true
rm -fI extras/extras/test_results/*.png || true
rm -rfI extras/extras/test_results/htmlcov/ || true
rm -f init-build.marker || true
rm -f init.marker || true
rm -f venv.marker || true
.PHONY: clean