summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2019-07-27 23:33:56 +0200
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2019-07-27 23:33:56 +0200
commitb544773db3e844ee4508335a511fa4dbbf421321 (patch)
treec39d1e219b252d08f02c6f943e141c554b2ee31a /tox.ini
parenteaa07e440b4a50bb8d4511ab6e84a09153406817 (diff)
downloadcherrypy-git-b544773db3e844ee4508335a511fa4dbbf421321.tar.gz
♲🎨 Evolve docs building tox env
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini15
1 files changed, 14 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index 59f7ce55..44ca83b8 100644
--- a/tox.ini
+++ b/tox.ini
@@ -57,9 +57,22 @@ commands =
python -m setup check --metadata --restructuredtext --strict --verbose
[testenv:build-docs]
+basepython = python3
extras =
docs
testing
changedir = docs
+# FIXME: Add -W option below once this issue is addressed:
+# https://github.com/jaraco/rst.linker/issues/7
+# And once all other warnings are gone.
commands =
- python -m sphinx . {toxinidir}/build/html
+ python -m sphinx \
+ -a -n -j auto \
+ -b html --color \
+ -d "{toxinidir}/build/html_docs_doctree" \
+ . "{toxinidir}/build/html"
+
+ # Print out the output docs dir and a way to serve html:
+ python -c \
+ 'import pathlib; '\
+ 'docs_dir = pathlib.Path(r"{toxinidir}") / "build" / "html"; index_file = docs_dir / "index.html"; print(f"\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n")'