commands = pytest
usedevelop = true
+
+[testenv:{build,clean}]
+description =
+ build: Build the package in isolation according to PEP517, see https://github.com/pypa/build
+ clean: Remove old distribution files and temporary build artifacts (./build and ./dist)
+# https://setuptools.pypa.io/en/stable/build_meta.html#how-to-use-it
+skip_install = True
+changedir = {toxinidir}
+deps =
+ build: build[virtualenv]
+passenv =
+ SETUPTOOLS_*
+commands =
+ clean: python -c 'import shutil; [shutil.rmtree(p, True) for p in ("build", "dist", "docs/_build")]'
+ clean: python -c 'import pathlib, shutil; [shutil.rmtree(p, True) for p in pathlib.Path("src").glob("*.egg-info")]'
+ build: python -m build {posargs}
+# By default, both `sdist` and `wheel` are built. If your sdist is too big or you don't want
+# to make it available, consider running: `tox -e build -- --wheel`
+
+
[testenv:docs]
description = Build the documentation with sphinx
basepython = python3