2024-02-06 02:53:19 +00:00
|
|
|
PKG:=aioitertools
|
|
|
|
EXTRAS:=dev,docs
|
2018-06-27 02:56:33 +00:00
|
|
|
|
2024-09-02 03:26:50 +00:00
|
|
|
UV:=$(shell uv --version)
|
|
|
|
ifdef UV
|
2024-09-01 23:49:01 +00:00
|
|
|
VENV:=uv venv
|
|
|
|
PIP:=uv pip
|
|
|
|
else
|
|
|
|
VENV:=python -m venv
|
|
|
|
PIP:=python -m pip
|
|
|
|
endif
|
|
|
|
|
2020-04-29 06:07:43 +00:00
|
|
|
.venv:
|
2024-09-01 23:49:01 +00:00
|
|
|
$(VENV) .venv
|
2018-06-27 02:56:33 +00:00
|
|
|
|
2020-04-29 06:07:43 +00:00
|
|
|
venv: .venv
|
2024-09-01 23:49:01 +00:00
|
|
|
source .venv/bin/activate && make install
|
|
|
|
echo 'run `source .venv/bin/activate` to use virtualenv'
|
2020-04-29 06:07:43 +00:00
|
|
|
|
2024-02-06 02:53:19 +00:00
|
|
|
install:
|
2024-09-01 23:49:01 +00:00
|
|
|
$(PIP) install -Ue .[$(EXTRAS)]
|
2024-02-06 02:53:19 +00:00
|
|
|
|
2018-06-27 02:56:33 +00:00
|
|
|
release: lint test clean
|
2020-04-22 18:05:20 +00:00
|
|
|
flit publish
|
2018-06-27 02:56:33 +00:00
|
|
|
|
2019-10-20 00:27:20 +00:00
|
|
|
format:
|
2024-02-06 02:53:19 +00:00
|
|
|
python -m ufmt format $(PKG)
|
2018-06-27 02:56:33 +00:00
|
|
|
|
|
|
|
lint:
|
2024-02-06 02:53:19 +00:00
|
|
|
python -m flake8 $(PKG)
|
|
|
|
python -m ufmt check $(PKG)
|
2018-06-27 02:56:33 +00:00
|
|
|
|
|
|
|
test:
|
2024-02-06 02:53:19 +00:00
|
|
|
python -m coverage run -m $(PKG).tests
|
2019-10-20 00:27:20 +00:00
|
|
|
python -m coverage report
|
2024-02-06 02:53:19 +00:00
|
|
|
python -m mypy -p $(PKG)
|
2018-06-27 02:56:33 +00:00
|
|
|
|
2020-04-29 06:07:43 +00:00
|
|
|
html: .venv README.md docs/*
|
|
|
|
source .venv/bin/activate && sphinx-build -b html docs html
|
|
|
|
|
2018-06-27 02:56:33 +00:00
|
|
|
clean:
|
2022-02-07 05:21:56 +00:00
|
|
|
rm -rf .mypy_cache build dist html README MANIFEST *.egg-info
|
2020-04-22 18:05:20 +00:00
|
|
|
|
|
|
|
distclean: clean
|
2022-02-07 05:21:56 +00:00
|
|
|
rm -rf .venv
|