forked from omnilib/thx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
38 lines (28 loc) · 753 Bytes
/
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
SRCS:=thx
EXTRAS:=dev,docs
.venv:
python -m venv .venv
source .venv/bin/activate && make install
echo 'run `source .venv/bin/activate` to use virtualenv'
venv: .venv
install:
python -m pip install -U pip
python -m pip install -e .[$(EXTRAS)]
release: lint test clean
flit publish
format:
python -m ufmt format $(SRCS)
lint:
python -m flake8 $(SRCS)
python -m ufmt check $(SRCS)
test:
python -m coverage run -m $(SRCS).tests
python -m coverage combine
python -m coverage report
python -m mypy --install-types --non-interactive -p $(SRCS)
html: .venv README.rst docs/*.rst docs/conf.py
source .venv/bin/activate && sphinx-build -b html docs html
clean:
rm -rf build dist html *.egg-info .mypy_cache
distclean: clean
rm -rf .venv