-
Notifications
You must be signed in to change notification settings - Fork 80
/
Makefile
107 lines (70 loc) · 1.83 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.PHONY: compile release test annotate buildext check-isort check-black
cyt:
cython blacksheep/url.pyx
cython blacksheep/exceptions.pyx
cython blacksheep/headers.pyx
cython blacksheep/cookies.pyx
cython blacksheep/contents.pyx
cython blacksheep/messages.pyx
cython blacksheep/scribe.pyx
cython blacksheep/baseapp.pyx
compile: cyt
python3 setup.py build_ext --inplace
clean:
rm -rf dist/
rm -rf build/
rm -f blacksheep/*.c
rm -f blacksheep/*.so
buildext:
python3 setup.py build_ext --inplace
annotate:
cython blacksheep/url.pyx -a
cython blacksheep/exceptions.pyx -a
cython blacksheep/headers.pyx -a
cython blacksheep/cookies.pyx -a
cython blacksheep/contents.pyx -a
cython blacksheep/messages.pyx -a
cython blacksheep/scribe.pyx -a
cython blacksheep/baseapp.pyx -a
build: test
python -m build
prepforbuild:
pip install --upgrade build
testrelease:
twine upload -r testpypi dist/*
release: clean compile artifacts
twine upload -r pypi dist/*
test:
pytest tests/
itest:
pytest itests/
init:
pip install -r requirements.txt
test-v:
pytest -v
test-cov-unit:
pytest --cov-report html --cov=blacksheep tests
test-cov:
pytest --cov-report html --cov=blacksheep --disable-warnings
lint: check-flake8 check-isort check-black
format:
@isort blacksheep 2>&1
@isort tests 2>&1
@isort itests 2>&1
@black blacksheep 2>&1
@black tests 2>&1
@black itests 2>&1
check-flake8:
@echo "$(BOLD)Checking flake8$(RESET)"
@flake8 blacksheep 2>&1
@flake8 tests 2>&1
check-isort:
@echo "$(BOLD)Checking isort$(RESET)"
@isort --check-only blacksheep 2>&1
@isort --check-only tests 2>&1
@isort --check-only itests 2>&1
check-black: ## Run the black tool in check mode only (won't modify files)
@echo "$(BOLD)Checking black$(RESET)"
@black --check blacksheep 2>&1
@black --check tests 2>&1
@black --check itests 2>&1