-
Notifications
You must be signed in to change notification settings - Fork 140
/
Makefile
133 lines (113 loc) · 2.56 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# NOTE: Some targets have a shortcuts or alias names that are listed on the same line.
# The are provided for convinience or for backward competibility. For example
# 'check-all' has the aliases 'check_all' and 'ca'.
# Install dependencies for apio development
#
# Usage:
# make deps
#
.PHONY: deps
deps:
python -m pip install --upgrade pip
pip install flit black flake8 pylint tox pytest semantic-version pyserial importlib-metadata
# Create the virtual-environment and update dependencies
#
# Usage:
# make cenv
#
.PHONY: cenv
cenv:
python3 -m venv venv
python3 -m venv venv --upgrade
# Usage
# make env
#
.PHONY: env
env:
@echo "For entering the virtual-environment just type:"
@echo ". venv/bin/activate"
# Lint only, no tests.
#
# Usage:
# make lint
# make l
#
.PHONY: lint l
lint l:
python -m tox -e lint
# Offline tests only, no lint, single python version, skipping online tests.
# This is a partial but fast test.
#
# Usage:
# make test
# make t
#
.PHONY: test t
test t:
python -m tox --skip-missing-interpreters false -e py313 -- --offline
# Same as 'make test' above but with the oldest supported bypon version.
#
# Usage:
# make test-oldest
# make to
#
.PHONY: test-oldest to
test-oldest to:
python -m tox --skip-missing-interpreters false -e py39 -- --offline
# Tests and lint, single python version, all tests including online..
# This is a thorough but slow test and sufficient for testign before
# commiting changes run this before submitting code.
#
# Usage:
# make check
# make c
#
.PHONY: check c
check c:
python -m tox --skip-missing-interpreters false -e lint,py313
# Same as 'make check' above but with the oldest supported bypon version.
#
# Usage:
# make check-oldest
# make co
#
.PHONY: check-oldest co
check-oldest co:
python -m tox --skip-missing-interpreters false -e lint,py39
# Tests and lint, multiple python versions.
# Should be be run automatically on github.
#
# Usage:
# make check-all
# make check_all // deprecated, to be deleted.
# make ca
#
.PHONY: check-all check_all ca
check-all check_all ca:
python -m tox --skip-missing-interpreters false
# Publish to testPypi
#
# Usage:
# make publish-test
# make publish_test // deprecated, to be deleted.
#
.PHONY: publish-test publish_test
publish-test publish_test:
flit publish --repository testpypi
# Publish to PyPi
#
# Usage:
# make publish
#
.PHONY: publish
publish:
python -m flit publish
## Install the tool locally
#
# Usage:
# make instll
#
.PHONY: install
install:
flit build
flit install