2019-12-01 20:57:21 +00:00
|
|
|
[tox]
|
|
|
|
envlist = py35,py36,py37,py38
|
2021-11-01 21:30:00 +00:00
|
|
|
isolated_build = true
|
|
|
|
minversion = 3.21.0
|
2019-12-01 20:57:21 +00:00
|
|
|
|
|
|
|
[testenv]
|
|
|
|
deps =
|
|
|
|
-rrequirements.txt
|
|
|
|
-rrequirements-testing.txt
|
|
|
|
command = pytest
|
2021-11-01 21:30:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
[dists]
|
|
|
|
setenv =
|
|
|
|
PEP517_OUT_DIR = {env:PEP517_OUT_DIR:{toxinidir}{/}dist}
|
|
|
|
|
|
|
|
|
|
|
|
[testenv:cleanup-dists]
|
|
|
|
description =
|
|
|
|
Wipe the the `{env:PEP517_OUT_DIR}{/}` folder
|
|
|
|
usedevelop = false
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
setenv =
|
|
|
|
{[dists]setenv}
|
|
|
|
commands =
|
|
|
|
{envpython} -c \
|
|
|
|
'import os, shutil, sys; dists_dir = os.getenv("PEP517_OUT_DIR"); shutil.rmtree(dists_dir, ignore_errors=True); sys.exit(os.path.exists(dists_dir))'
|
|
|
|
|
|
|
|
|
|
|
|
[testenv:build-dists]
|
|
|
|
description =
|
|
|
|
Build non-universal dists and put them into
|
|
|
|
the `{env:PEP517_OUT_DIR}{/}` folder
|
|
|
|
depends =
|
|
|
|
cleanup-dists
|
|
|
|
isolated_build = true
|
|
|
|
# `usedevelop = true` overrides `skip_install` instruction, it's unwanted
|
|
|
|
usedevelop = false
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
build >= 0.7.0, < 0.8.0
|
|
|
|
passenv =
|
|
|
|
PEP517_BUILD_ARGS
|
|
|
|
setenv =
|
|
|
|
{[dists]setenv}
|
|
|
|
commands =
|
|
|
|
{envpython} -m build \
|
|
|
|
--outdir '{env:PEP517_OUT_DIR}{/}' \
|
|
|
|
{posargs:{env:PEP517_BUILD_ARGS:}} \
|
|
|
|
'{toxinidir}'
|
|
|
|
|
|
|
|
|
|
|
|
[testenv:metadata-validation]
|
|
|
|
description =
|
|
|
|
Verify that dists under the `{env:PEP517_OUT_DIR}{/}` dir
|
|
|
|
have valid metadata
|
|
|
|
depends =
|
|
|
|
build-dists
|
|
|
|
deps =
|
|
|
|
twine
|
|
|
|
usedevelop = false
|
|
|
|
skip_install = true
|
|
|
|
setenv =
|
|
|
|
{[dists]setenv}
|
|
|
|
commands =
|
|
|
|
{envpython} -m twine check \
|
|
|
|
--strict \
|
|
|
|
{env:PEP517_OUT_DIR}{/}*
|