-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathtox.ini
125 lines (108 loc) · 2.7 KB
/
tox.ini
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
[tox]
envlist = py37, py38, py39, py310, flake8
[python-cli-options]
byte-warnings = -b
byte-errors = -bb
max-isolation = -E -s -I
some-isolation = -E -s
warnings-to-errors = -Werror
[testenv]
commands = py.test {posargs:requests_unixsocket/tests}
dependency_groups =
testing
[testenv:cleanup-dists]
description =
Wipe the the dist{/} folder
dependency_groups =
commands_pre =
commands =
{envpython} \
{[python-cli-options]byte-errors} \
{[python-cli-options]max-isolation} \
{[python-cli-options]warnings-to-errors} \
-c \
'import os, shutil, sys; \
dists_dir = "{toxinidir}{/}dist{/}"; \
shutil.rmtree(dists_dir, ignore_errors=True); \
sys.exit(os.path.exists(dists_dir))'
commands_post =
package = skip
[testenv:build-dists]
description =
Build dists with {basepython} and put them into the dist{/} folder
dependency_groups =
building
depends =
cleanup-dists
commands =
{envpython} \
{[python-cli-options]byte-errors} \
{[python-cli-options]max-isolation} \
{[python-cli-options]warnings-to-errors} \
-m build \
{posargs:}
commands_post =
package = skip
[testenv:metadata-validation]
description =
Verify that dists under the `dist{/}` dir
have valid metadata
dependency_groups =
upstreaming
depends =
build-dists
commands_pre =
{envpython} \
{[python-cli-options]byte-errors} \
{[python-cli-options]max-isolation} \
{[python-cli-options]warnings-to-errors} \
'-Wdefault{:}git archive did not support describe output\
{:}UserWarning{:}setuptools_scm.git' \
'-Wdefault{:}unprocessed git archival found\
{:}UserWarning{:}setuptools_scm.git' \
-m setuptools_scm \
ls
commands =
{envpython} \
{[python-cli-options]byte-errors} \
{[python-cli-options]max-isolation} \
{[python-cli-options]warnings-to-errors} \
-m twine \
check \
--strict \
dist{/}*
commands_post =
package = skip
[testenv:flake8]
commands = flake8
deps =
flake8
{[testenv]deps}
[testenv:venv]
commands = {posargs}
[testenv:coverage]
commands =
coverage erase
coverage run --source requests_unixsocket -m py.test requests_unixsocket/tests
coverage report --show-missing
coverage html
deps =
coverage
{[testenv]deps}
[testenv:doctest]
# note this only works under python 3 because of unicode literals
commands =
python -m doctest README.rst
[testenv:sphinx-doctest]
# note this only works under python 3 because of unicode literals
commands =
mkdir build/sphinx/doctest
sphinx-build -b doctest docs build/sphinx/doctest
deps =
pbr
{[testenv]deps}
[testenv:docs]
commands = python setup.py build_sphinx
[flake8]
max_line_length = 79
exclude = .git,.tox,dist,docs,*egg