Improve tox docs config (#12434)

For example, allow for `CLEAN=true BUILDER=man tox -e docs -- -j4`, 
to use the `man` builder on a clean build, with 4 processes
This commit is contained in:
Chris Sewell 2024-06-17 11:52:52 +02:00 committed by GitHub
parent 568e26c797
commit b97d14a8b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,8 @@ passenv =
DO_EPUBCHECK
EPUBCHECK_PATH
TERM
CLEAN
BUILDER
description =
py{39,310,311,312,313}: Run unit tests against {envname}.
extras =
@ -33,7 +35,8 @@ description =
extras =
docs
commands =
sphinx-build -M html ./doc ./build/sphinx -W --keep-going
python -c "import shutil; shutil.rmtree('./build/sphinx', ignore_errors=True) if '{env:CLEAN:}' else None"
sphinx-build -M {env:BUILDER:html} ./doc ./build/sphinx -nW --keep-going {posargs}
[testenv:docs-live]
basepython = python3