Skip to content

Commit

Permalink
Move Sphinx build customization to env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Jan 4, 2024
1 parent 901ac6e commit 1258249
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ build:
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
tox -e build-docs --notest -vvvvv
- >-
SPHINX_BUILDER=dirhtml
SPHINX_BUILD_OUTPUT_DIRECTORY="${READTHEDOCS_OUTPUT}"/html
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
tox -e build-docs --skip-pkg-install -q
--
"${READTHEDOCS_OUTPUT}"/html
...
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,17 @@ commands =

# Build the html docs with Sphinx:
{envpython} -m sphinx \
{posargs:\
-j auto \
-b html \
-b {env:SPHINX_BUILDER:html} \
{tty:--color} \
-a \
-n \
-W --keep-going \
-d "{temp_dir}/.doctrees" \
. \
{posargs:"{envdir}/docs_out"}
{env:SPHINX_BUILD_OUTPUT_DIRECTORY:"{envdir}/docs_out"} \
}

# Print out the output docs dir and a way to serve html:
-{envpython} -c\
Expand All @@ -350,6 +352,8 @@ commands =
changedir = {toxinidir}/docs
isolated_build = true
passenv =
SPHINX_BUILDER
SPHINX_BUILD_OUTPUT_DIRECTORY
SSH_AUTH_SOCK
skip_install = true

Expand Down

0 comments on commit 1258249

Please sign in to comment.