1
1
[tox]
2
- # toxworkdir = /data1/DATA/tox/ruyaml
2
+ minversion = 3.16.1
3
3
envlist =
4
4
linters
5
5
docs
6
6
packaging
7
7
py{36,37,38,39,310}
8
+ isolated_build = true
9
+ requires =
10
+ setuptools >= 41.4.0
11
+ pip >= 19.3.0
12
+ skip_missing_interpreters = False
8
13
9
14
[testenv]
10
15
description = Unittest using {basepython}
@@ -13,6 +18,9 @@ commands =
13
18
/bin/bash -c ' pytest _test/test_*.py'
14
19
deps =
15
20
pytest
21
+ allowlist_externals =
22
+ make
23
+ sh
16
24
17
25
[testenv:docs]
18
26
description = Build docs
@@ -22,8 +30,6 @@ extras =
22
30
commands =
23
31
make singlehtml
24
32
changedir = {toxinidir}/_doc
25
- whitelist_externals =
26
- make
27
33
28
34
[testenv:linters]
29
35
description = Linting
@@ -37,29 +43,29 @@ commands =
37
43
38
44
[testenv:packaging]
39
45
description =
40
- Do packaging/distribution. If tag is not present or PEP440 compliant upload to
41
- PYPI could fail
46
+ Do packaging/distribution
42
47
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
43
48
usedevelop = false
44
49
# don't install package itself in this env
45
50
skip_install = true
46
51
deps =
47
- collective.checkdocs ==0.2
48
- pep517 >= 0.5.0
49
- twine ==1.14.0 # pyup: ignore
52
+ build >= 0.7.0
53
+ twine >= 3.7.0
50
54
setenv =
51
55
commands =
52
- rm -rfv {toxinidir}/dist/
53
- python -m pep517.build \
54
- --source \
55
- --binary \
56
- --out-dir {toxinidir}/dist/ \
57
- {toxinidir}
58
- # metadata validation
59
- sh -c " python -m twine check {toxinidir}/dist/*"
60
- whitelist_externals =
61
- rm
62
- sh
56
+ # build wheel and sdist using PEP-517
57
+ {envpython} -c ' import os.path, shutil, sys; \
58
+ dist_dir = os.path.join("{toxinidir}", "dist"); \
59
+ os.path.isdir(dist_dir) or sys.exit(0); \
60
+ print("Removing \{ !s\} contents...".format(dist_dir), file=sys.stderr); \
61
+ shutil.rmtree(dist_dir)'
62
+ {envpython} -m build \
63
+ --outdir {toxinidir}/dist/ \
64
+ {toxinidir}
65
+ # Validate metadata using twine
66
+ twine check --strict {toxinidir}/dist/*
67
+ # Install the wheel
68
+ sh -c " python3 -m pip install --force-reinstall {toxinidir}/dist/*.whl"
63
69
64
70
[pytest]
65
71
filterwarnings =
0 commit comments