forked from aio-libs/yarl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (39 loc) · 1.09 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
58
59
60
61
62
63
64
65
66
67
68
69
PYXS = $(wildcard yarl/*.pyx)
SRC = yarl tests setup.py
all: test
.install-deps: $(shell find requirements -type f)
@pip install -U -r requirements/dev.txt
@touch .install-deps
.install-cython: requirements/cython.txt
pip install -r requirements/cython.txt
touch .install-cython
yarl/%.c: yarl/%.pyx
cython -3 -o $@ $< -I yarl
.cythonize: .install-cython $(PYXS:.pyx=.c)
cythonize: .cythonize
.develop: .install-deps $(shell find yarl -type f) .cythonize
@pip install -e .
@touch .develop
flake8:
flake8 $(SRC)
black-check:
black --check $(SRC)
mypy:
mypy yarl tests
lint: flake8 black-check mypy
fmt:
black $(SRC)
test: lint .develop
pytest ./tests ./yarl
vtest: lint .develop
pytest ./tests ./yarl -v
cov: lint .develop
pytest --cov yarl --cov-report html --cov-report term ./tests/ ./yarl/
@echo "open file://`pwd`/htmlcov/index.html"
doc: doctest doc-spelling
make -C docs html SPHINXOPTS="-W -E"
@echo "open file://`pwd`/docs/_build/html/index.html"
doctest: .develop
make -C docs doctest SPHINXOPTS="-W -E"
doc-spelling:
make -C docs spelling SPHINXOPTS="-W -E"