-
-
Notifications
You must be signed in to change notification settings - Fork 246
/
Makefile
63 lines (45 loc) · 1.13 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
56
57
58
59
60
61
62
63
# developer file, not intended for installing python-snap7
.PHONY: test setup doc mypy test pycodestyle
all: test
venv/:
python3 -m venv venv
venv/bin/pip install --upgrade pip wheel
venv/installed: venv/
venv/bin/pip install -e .
touch venv/installed
venv/bin/pytest: venv/
venv/bin/pip install -e ".[test]"
venv/bin/sphinx-build: venv/
venv/bin/pip install -e ".[doc,cli]"
venv/bin/tox: venv/
venv/bin/pip install tox
requirements-dev.txt: venv/bin/tox pyproject.toml
venv/bin/tox -e requirements-dev
.PHONY: setup
setup: venv/installed
.PHONY: doc
doc: venv/bin/sphinx-build
venv/bin/sphinx-build -N -bhtml doc/ doc/_build
.PHONY: check
check: venv/bin/pytest
venv/bin/ruff check snap7 tests example
venv/bin/ruff format --diff snap7 tests example
.PHONY: ruff
ruff: venv/bin/tox
venv/bin/tox -e ruff
.PHONY: format
format: ruff
.PHONY: mypy
mypy: venv/bin/tox
venv/bin/tox -e mypy
.PHONY: test
test: venv/bin/pytest
venv/bin/pytest
.PHONY: clean
clean:
rm -rf venv python_snap7.egg-info .pytest_cache .tox dist .eggs
.PHONY: tox
tox: venv/bin/tox
venv/bin/tox
.PHONY: requirements
requirements: requirements-dev.txt