forked from pex-tool/pex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
153 lines (137 loc) · 3.48 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
142
143
144
145
146
147
148
149
150
151
152
[tox]
isolated_build = true
skip_missing_interpreters = True
minversion = 3.21.4
[tox:.package]
# N.B.: tox will use the same python version as under what tox is installed to package, so unless
# this is python 3 you can require a given python version for the packaging environment via the
# basepython key. We need this for flit which only runs under python3 but works for python2
# projects.
basepython = python3
[testenv]
commands =
pytest --ignore="tests/test_integration.py" {posargs:-vvs}
# Ensure pex's main entrypoint can be run externally.
pex --disable-cache . -e pex.bin.pex:main --version
deps =
pytest==4.6.11
pkginfo==1.7.0
py{27,py,py2}: mock==3.0.5
subprocess: subprocess32
passenv =
# This allows working around broken xcode Python SDKs.
ARCHFLAGS
# This allows re-locating the pyenv interpreter test cache for CI.
_PEX_TEST_PYENV_ROOT
# These are to support directing test environments to the correct headers on OSX.
CPATH
CPPFLAGS
LDFLAGS
PEX_VERBOSE
whitelist_externals =
open
bash
git
[testenv:py{py,py-subprocess,py2,py2-subprocess,py3,27,35,36,37,38,39}-integration]
deps =
pytest-xdist==1.34.0
{[testenv]deps}
commands =
pytest -n auto tests/test_integration.py {posargs:-vvs}
[testenv:format-run]
skip_install = true
deps =
black==20.8b1
isort==4.3.21
commands =
black .
isort \
--apply \
--dont-skip __init__.py \
--skip-glob pex/vendor/_vendored/** \
--skip-glob .pyenv_test/**
[testenv:format-check]
skip_install = true
deps =
{[testenv:format-run]deps}
commands =
black --check .
isort \
--check-only \
--dont-skip __init__.py \
--skip-glob pex/vendor/_vendored/** \
--skip-glob .pyenv_test/**
[testenv:typecheck]
deps =
attrs==20.3.0 # This version should track the version in pex/vendor/__init__.py.
mypy==0.800
commands =
bash scripts/typecheck.sh
[testenv:vendor]
# The vendored dist may contain references to the python version it was built on
# (e.g., pex/vendor/_vendored/pip/pip-20.0.dev0.dist-info/entry_points.txt).
# So this test restricts the python version, to prevent spurious diffs that will cause it to fail.
basepython = python3.8
skip_install = true
deps =
ansicolors==1.1.8
pip==20.2.4
redbaron==0.9.2
setuptools==50.3.2
wheel==0.35.1
{[testenv:format-run]deps}
commands =
python -m pex.vendor
{[testenv:format-run]commands}
[testenv:vendor-check]
basepython = {[testenv:vendor]basepython}
skip_install = true
deps =
tox
commands =
tox -e vendor
bash scripts/embed_virtualenv.sh
git diff --exit-code
[testenv:docs]
changedir = docs
deps =
sphinx
sphinx-rtd-theme
commands =
sphinx-build -b html -d {envtmpdir}/doctrees . _build/html
open _build/html/index.html
[_flit]
basepython = python3
deps =
flit
pygments
[_package]
basepython = {[_flit]basepython}
deps =
{[_flit]deps}
toml
[testenv:package]
skip_install = true
basepython = {[_package]basepython}
deps =
{[_package]deps}
commands =
python scripts/package.py {posargs}
[testenv:serve]
skip_install = true
basepython = {[_package]basepython}
deps =
{[_package]deps}
commands =
python scripts/package.py --additional-format wheel --local --serve {posargs}
[testenv:publish]
skip_install = true
basepython = {[_flit]basepython}
passenv =
# These are used in CI.
FLIT_USERNAME
FLIT_PASSWORD
deps =
{[_flit]deps}
commands =
flit publish