Compare commits

..

1 Commits

Author SHA1 Message Date
84baf725f2 Update tox template
All checks were successful
gl/check check status: success (84baf725f28b43df83ff5f4ab3513a9b4e8f0afa)
gl/gate gate status: success (84baf725f28b43df83ff5f4ab3513a9b4e8f0afa)
2023-01-06 17:13:20 +01:00
2 changed files with 10 additions and 6 deletions

View File

@ -104,6 +104,9 @@ html_title = "{{ title }}"
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Do not include sources into the rendered results
html_copy_source = False
# -- Options for PDF output --------------------------------------------------
latex_documents = [
{%- if pdf_name is defined %}

View File

@ -21,12 +21,14 @@ deps =
-r{toxinidir}/requirements.txt
commands = {posargs}
# This env is invoked in the periodic pipeline and is therefore responsible to
# build all relevant docs at once.
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
allowlist_externals =
mkdir
cp
find
sh
commands =
{%- for doc in docs %}
{[testenv:{{ doc.type }}]commands}
@ -57,10 +59,8 @@ deps = -r{toxinidir}/doc/requirements.txt
allowlist_externals =
cp
mkdir
find
commands =
sphinx-build -W --keep-going -b html {{ loc }}/source doc/build/html/{{ doc.type }}
find doc/build/html -type d -name '_sources' -exec rm -rf {:} ;
{%- if doc.type == 'api-ref' %}
mkdir -p api-ref/build/html
cp -av doc/build/html/api-ref api-ref/build/html
@ -78,11 +78,12 @@ deps = -r{toxinidir}/doc/requirements.txt
allowlist_externals =
cp
mkdir
find
sh
commands =
sphinx-build -W --keep-going -b json {{ loc }}/source doc/build/json/{{ doc.type }}
# Drop data useless for the search
find doc/build/json -type d -and ( -name '_images' -or -name '_static' -or -name '_sources' ) -exec rm -rf {:} ;
# Drop data useless for the search - wrap it also with sh/xargs due to bugs
# in tox
sh -c "find doc/build/json -type d -and '(' -name '_images' -or -name '_static' -or -name '_sources' ')' -print0 | xargs -0 rm -rf"
{%- if doc.type == 'api-ref' %}
mkdir -p api-ref/build/json
cp -av doc/build/json/api-ref api-ref/build/json