-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
57 lines (43 loc) · 1.15 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
.PHONY: auto test docs clean
auto: build311
build38: PYTHON_VER = python3.8
build39: PYTHON_VER = python3.9
build310: PYTHON_VER = python3.10
build311: PYTHON_VER = python3.11
build312: PYTHON_VER = python3.12
build38 build39 build310 build311 build312: clean
$(PYTHON_VER) -m venv venv
. venv/bin/activate; \
pip install -U pip setuptools wheel; \
pip install -r requirements/requirements-docs.txt; \
pip install -r requirements/requirements-tests.txt; \
pre-commit install
test:
rm -f .coverage coverage.xml
. venv/bin/activate; pytest
lint:
. venv/bin/activate; pre-commit run --all-files --show-diff-on-failure
docs: clean-docs
. venv/bin/activate; \
cd docs; \
make html
live-docs: clean-docs
. venv/bin/activate; \
sphinx-autobuild docs docs/_build/html
build-dist: clean-dist
. venv/bin/activate; \
pip install -U flit; \
flit build
deep-clean-dry-run:
git clean -xdn
deep-clean:
git clean -xdf
clean-env:
rm -rf venv .tox
clean-dist:
rm -rf dist build *.egg *.eggs *.egg-info
clean-docs:
rm -rf docs/_build
clean: clean-env clean-dist clean-docs
rm -rf .pytest_cache ./**/__pycache__ .mypy_cache
rm -f .coverage coverage.xml ./**/*.pyc