PDF Documentation Build tox target

This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:

  https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.

Story: 2006105

Change-Id: Ia0599ac65cc324e317430495a879f52c76f72484
Signed-off-by: Alexandra Settle <asettle@suse.com>
This commit is contained in:
Alexandra Settle 2019-10-08 12:56:45 +01:00 committed by Jonathan Rosser
parent d9cf71dd5a
commit 955cf52863
4 changed files with 20 additions and 5 deletions

View File

@ -40,3 +40,7 @@ libsemanage-python [platform:redhat]
gzip
# Required to build language docs
gettext
# libsrvg2 is needed for sphinxcontrib-svg2pdfconverter in docs builds.
librsvg2-tools [doc platform:rpm]
librsvg2-bin [doc platform:dpkg]

View File

@ -4,7 +4,8 @@
# this is required for the docs build jobs
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
sphinx>=1.8.0,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
openstackdocstheme>=1.29.2 # Apache-2.0
reno>=2.11.3 # Apache-2.0
doc8>=0.8.0 # Apache-2.0

View File

@ -109,7 +109,8 @@ sys.path.insert(0, os.path.abspath('../../inventory/'))
extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
'sphinx.ext.extlinks'
'sphinx.ext.extlinks',
'sphinxcontrib.rsvgconverter'
]
# Add any paths that contain templates here, relative to this directory.
@ -278,10 +279,12 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, target_name + '.tex',
(master_doc, 'doc-' + target_name + '.tex',
title, author, 'manual'),
]
latex_use_xindy = False
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None

11
tox.ini
View File

@ -41,7 +41,7 @@ setenv =
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands=
commands =
doc8 doc
docstheme-build-translated.sh
@ -52,7 +52,14 @@ basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[doc8]
# Settings for doc8: