-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathtox.ini
141 lines (132 loc) · 3.01 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# cspell: ignore REQPASS posargs packit packitos devel
[tox]
min_version = 4.6.3
env_list =
lint
pkg
deps
py
alpine
isolated_build = true
requires =
tox >= 4.6.3
tox-uv >= 1.16.0
tox-extra
setuptools >= 65.3.0 # editable installs
[testenv]
description =
Run the tests under {base_python}
use_develop = True
# do not put * in pass_env as it may break builds do to reduced isolation
pass_env =
CI
CURL_CA_BUNDLE # https proxies, https://github.com/tox-dev/tox/issues/1437
FORCE_COLOR
GITHUB_*
HOME
LANG
LC_*
NO_COLOR
PIP_*
PUBLISH
PYTEST_*
PYTEST_* # allows developer to define their own preferences
PYTHON* # PYTHONPYCACHEPREFIX, PYTHONIOENCODING, PYTHONBREAKPOINT,...
PY_COLORS
REQUESTS_CA_BUNDLE # https proxies
RTD_TOKEN
SETUPTOOLS_SCM_DEBUG
SSH_AUTH_SOCK # may be needed by git
SSL_CERT_FILE # https proxies
TERM
UV_*
setenv =
PIP_CONSTRAINT = {tox_root}/.config/constraints.txt
devel,pkg,pre: PIP_CONSTRAINT = /dev/null
PIP_DISABLE_VERSION_CHECK=1
PYTEST_REQPASS=18
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
commands =
python -m pytest
extras =
test
allowlist_externals =
find
rm
sh
changedir = {tox_root}
[testenv:alpine]
description = Tests installation on Alpine linux
skip_install = true
commands =
docker build .
allowlist_externals =
docker
[testenv:docs]
description = Build docs
extras =
docs
commands =
mkdocs build --strict
[testenv:lint]
description = Run all linters
deps =
pre-commit>=4.0.1
pre-commit-uv>=4.1.4
setuptools>=51.1.1
skip_install = true
commands_pre =
commands =
{env_python} -m pre_commit run --all-files --show-diff-on-failure {posargs:}
pass_env =
{[testenv]pass_env}
PRE_COMMIT_HOME
setenv =
{[testenv]setenv}
# avoid messing pre-commit with out own constraints
PIP_CONSTRAINT=
[testenv:deps]
description = Bump all test dependencies
# we reuse the lint environment
env_dir = {work_dir}/lint
skip_install = true
deps =
{[testenv:lint]deps}
setenv =
# without his upgrade would likely not do anything
PIP_CONSTRAINT = /dev/null
commands_pre =
commands =
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual lock
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps
# Update pre-commit hooks
-pre-commit autoupdate
extras =
use_develop = false
[testenv:pkg]
description =
Do packaging and distribution tests, PEP-440,PEP-517,PEP-621
# `use_develop = true` overrides `skip_install` instruction, it's unwanted
used_develop = false
# don't install package in this env
skip_install = true
deps =
build >= 0.9.0
twine >= 4.0.1
setenv =
commands =
rm -rfv {tox_root}/dist/
python -m build \
--outdir {tox_root}/dist/ \
{tox_root}
# metadata validation
python -m twine check --strict {tox_root}/dist/*
[testenv:rpm]
description = Use packit to build RPM (requires RPM based Linux distro)
deps =
build
packitos
setuptools-scm
commands =
sh -c "packit build in-mock --root=fedora-40-$(arch)"