-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
118 lines (110 loc) · 2.59 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
[tox]
minversion = 3.8.0
requires =
tox-pyenv
envlist =
lint
pkg
py38
py37
py36
py35
docs
ignore_basepython_conflict = True
skip_missing_interpreters = True
skipdist = True
[testenv:docs]
extras =
docs
# changedir=docs
usedevelop = False
skipdist = False
setenv =
PYTHONHTTPSVERIFY=0
commands =
# pip install "..[docs]"
bash -c "set | grep REQUESTS_CA_BUNDLE"
python -m sphinx \
-a -n -W \
-b html --color \
-d "{toxworkdir}/docs_doctree" \
docs/ "{toxworkdir}/docs_out"
# Print out the output docs dir and a way to serve html:
python -c \
'import pathlib; '\
'docs_dir = pathlib.Path(r"{toxworkdir}") / "docs_out"; index_file = docs_dir / "index.html"; print(f"\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n")'
[testenv]
usedevelop = True
# hide deps from stdout https://github.com/tox-dev/tox/issues/601
# list_dependencies_command=echo
extras =
cli
opt
test
sitepackages=False
commands=
bash -c 'find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf'
python -m pip check
python -m pytest {posargs}
setenv =
PIP_LOG={envdir}/pip.log
PIP_DISABLE_PIP_VERSION_CHECK=1
# Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
passenv =
CI
CI_JIRA_*
CURL_CA_BUNDLE
PIP_*
REQUESTS_CA_BUNDLE
SSL_CERT_FILE
TRAVIS*
TWINE_*
XDG_CACHE_HOME
envars =
PIP_DISABLE_PIP_VERSION_CHECK=1
PIP_USER=no
whitelist_externals =
bash
echo
find
grep
rm
xargs
[testenv:pkg]
deps =
collective.checkdocs>=0.2
pep517>=0.7.0
pip>=19.2.3
setuptools>=41.4
twine>=2.0.0
wheel>=0.33.6
commands =
rm -rf {toxinidir}/dist
python setup.py check -m -s
# disabled due to errors with older setuptools:
# python setup.py sdist bdist_wheel
python -m pep517.build \
--source \
--binary \
--out-dir {toxinidir}/dist/ \
{toxinidir}
python -m twine check {toxinidir}/dist/*
[testenv:lint]
deps = pre-commit>=1.17.0
commands=
bash -c "npm install && npm run spell"
python -m pre_commit run --color=always {posargs:--all}
extras =
skip_install = true
usedevelop = false
[testenv:maintenance]
# this will obliterate your jira instance, used to clean the CI server
commands=
python examples/maintenance.py
[testenv:upload]
envdir = {toxworkdir}/pkg
deps = {[testenv:pkg]deps}
commands =
{[testenv:pkg]commands}
twine upload dist/*