Debian Codegraph @

makefile

raw
1 PKG:=aioitertools
2 EXTRAS:=dev,docs
3
4 UV:=$(shell uv --version)
5 ifdef UV
6 VENV:=uv venv
7 PIP:=uv pip
8 else
9 VENV:=python -m venv
10 PIP:=python -m pip
11 endif
12
13 .venv:
14 $(VENV) .venv
15
16 venv: .venv
17 source .venv/bin/activate && make install
18 echo 'run `source .venv/bin/activate` to use virtualenv'
19
20 install:
21 $(PIP) install -Ue .[$(EXTRAS)]
22
23 release: lint test clean
24 flit publish
25
26 format:
27 python -m ufmt format $(PKG)
28
29 lint:
30 python -m flake8 $(PKG)
31 python -m ufmt check $(PKG)
32
33 test:
34 python -m coverage run -m $(PKG).tests
35 python -m coverage report
36 python -m mypy -p $(PKG)
37
38 html: .venv README.md docs/*
39 source .venv/bin/activate && sphinx-build -b html docs html
40
41 clean:
42 rm -rf .mypy_cache build dist html README MANIFEST *.egg-info
43
44 distclean: clean
45 rm -rf .venv