Skip to content

Commit

Permalink
modified tox for bindeps
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianGode committed Dec 18, 2024
1 parent 7ed09f4 commit b1d458d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 92 deletions.
84 changes: 0 additions & 84 deletions doc/source/_templates/longtable.tex.jinja

This file was deleted.

51 changes: 43 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,53 @@ commands =

[testenv:pdf-docs]
envdir = {toxworkdir}/docs
allowlist_externals =
rm
mkdir
wget
make
bash
cp
commands =
mkdir -p doc/build/pdf
{[testenv:bindeps]commands}
mkdir -p {toxinidir}/_templates
wget -O {toxinidir}/_templates/longtable.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/longtable.tex.jinja
wget -O {toxinidir}/_templates/tabular.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabular.tex.jinja
wget -O {toxinidir}/_templates/tabulary.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabulary.tex.jinja
{[testenv:doc-pdf-docs]commands}

# PDF version
[testenv:doc-pdf-docs]
deps = {[testenv:docs]deps}
allowlist_externals =
rm
mkdir
make
bash
cp
commands =
rm -rf doc/build/pdf
sphinx-build -a -E -W -b latex doc/source doc/build/pdf
cp -r {toxinidir}/_templates doc/source/_templates/
sphinx-build -W --keep-going -b latex doc/source doc/build/pdf/
bash -c "for f in doc/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true"
bash -c "for f in doc/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done"
make -C doc/build/pdf

[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test
[testenv:bindeps]
deps =
bindep
allowlist_externals =
wget
rm
bash
commands =
rm -rf {toxinidir}/bindep.txt
rm -rf {toxinidir}/packages.txt
wget -O {toxinidir}/bindep.txt https://raw.githubusercontent.com/opentelekomcloud/otcdocstheme/main/bindep.txt
bash -c "bindep test -b -f {toxinidir}/bindep.txt > {toxinidir}/packages.txt || true"
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v apt &>/dev/null; then apt update && xargs apt install --no-install-recommends -y < {toxinidir}/packages.txt; fi; fi'
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v dnf &>/dev/null; then dnf install -y $(cat {toxinidir}/packages.txt); fi; fi'

[flake8]
exclude=.venv,.git,.tox,dist,doc,api-ref,*lib/python*,*egg,tools
Expand Down

0 comments on commit b1d458d

Please sign in to comment.