22#
33# SPDX-License-Identifier: ISC
44
5- .PHONY : all format lint test coverage clean publish pip reuse .venv docs-serve docs-build
5+
6+ .PHONY : all sync sync-frozen format lint test coverage clean build dist repair-wheels publish reuse docs-serve docs-build docs-deploy-dev-main docs-deploy-versioned
67
78all : format lint coverage build
89
9- pip :
10- python -m pip install --upgrade pip
11- python -m pip install -e " .[dev]"
10+ sync :
11+ uv sync --extra dev
12+
13+ sync-frozen :
14+ uv sync --frozen --extra dev
1215
1316reuse :
14- reuse annotate \
17+ uv run reuse annotate \
1518 --copyright " Alexandre Gomes Gaigalas <alganet@gmail.com>" \
1619 --license ISC \
1720 --recursive .
1821
19- .venv :
20- python -m venv .venv
21- . .venv/bin/activate && make pip
22-
2322format : reuse
24- python -m black apywire tests
25- python -m isort apywire tests
23+ uv run black apywire tests
24+ uv run isort apywire tests
2625
2726lint :
28- python -m reuse lint
29- python -m flake8 apywire tests
30- python -m mypy apywire tests
27+ uv run reuse lint
28+ uv run flake8 apywire tests
29+ uv run mypy apywire tests
3130
3231test :
33- python -m pytest -q
32+ uv run pytest -q
3433
3534coverage :
3635 rm -f apywire/* .so apywire/wiring.c
37- python -m pytest --cov
36+ uv run pytest --cov
3837
3938clean :
4039 find . -name __pycache__ -type d -exec rm -rf {} +
@@ -43,24 +42,33 @@ clean:
4342 rm -rf .mypy_cache .pytest_cache * .egg-info dist build
4443
4544build :
46- python setup.py build_ext --inplace
45+ uv run python setup.py build_ext --inplace
4746
4847dist :
49- python -m build
48+ uv run python -m build
5049
5150repair-wheels :
52- python -m pip install --upgrade auditwheel
53- auditwheel repair dist/* .whl -w dist/repaired
51+ uv run auditwheel repair dist/* .whl -w dist/repaired
5452 rm -f dist/* .whl
5553 mv dist/repaired/* .whl dist/
5654 rm -rf dist/repaired
5755
5856publish : dist repair-wheels
59- python -m pip install --upgrade twine
60- python -m twine upload dist/*
57+ uv run twine upload dist/*
6158
6259docs-serve :
63- python -m mkdocs serve
60+ uv run mkdocs serve
6461
6562docs-build :
66- python -m mkdocs build
63+ uv run mkdocs build
64+
65+ docs-deploy-dev-main :
66+ uv run mike deploy --push --branch website dev-main
67+
68+ docs-deploy-versioned :
69+ @if [ -z " $( VERSION) " ]; then \
70+ echo " VERSION is required (e.g. make $@ VERSION=0.2.0)" ; \
71+ exit 2; \
72+ fi
73+ uv run mike deploy --push --update-aliases --branch website $(VERSION ) latest
74+ uv run mike set-default --push --branch website latest
0 commit comments