From 48afd06ab68e06825b3e2d6403728d7dd87a6f2f Mon Sep 17 00:00:00 2001 From: Russell Martin Date: Thu, 15 Feb 2024 20:36:12 -0500 Subject: [PATCH] Run `sphinx-autobuild` via `tox -e docs-live[-src]` --- changes/2400.misc.rst | 1 + tox.ini | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changes/2400.misc.rst diff --git a/changes/2400.misc.rst b/changes/2400.misc.rst new file mode 100644 index 0000000000..7aa4d834bf --- /dev/null +++ b/changes/2400.misc.rst @@ -0,0 +1 @@ +The ``sphinx-autobuild`` tool can now be invoked via ``tox -e docs-live`` and ``tox -e docs-live-src``. diff --git a/tox.ini b/tox.ini index 74d3135ea8..32a9085c1a 100644 --- a/tox.ini +++ b/tox.ini @@ -49,11 +49,10 @@ sphinx_args = -W --keep-going -j auto # -d: use tox's temp dir for caching sphinx_args_extra = {[docs]sphinx_args} -v -E -T -a -d {envtmpdir}/doctrees -[testenv:docs{,-lint,-all}] +[testenv:docs{,-lint,-all,-live,-live-src}] skip_install = True change_dir = docs -deps = - ./core[docs] +deps = ./core[docs] passenv = # On macOS M1, you need to manually set the location of the PyEnchant # library: @@ -64,6 +63,8 @@ commands = lint : python -m sphinx {[docs]sphinx_args_extra} -b spelling . {[docs]build_dir}/spell lint : python -m sphinx {[docs]sphinx_args_extra} -b linkcheck . {[docs]build_dir}/links all : python -m sphinx {[docs]sphinx_args_extra} -b html . {[docs]build_dir}/html + live-!src : sphinx-autobuild {[docs]sphinx_args} -b html . {[docs]build_dir}/html + live-src : sphinx-autobuild {[docs]sphinx_args_extra} -b html . {[docs]build_dir}/html --watch ../core/src/toga/ [testenv:package] skip_install = True