Create tox environment to build pdf documentation

This patch enables building .pdf documentation using new 'pdf-docs'
tox environment. The newly created tox environment creates latex
source codes using sphinx-build and then builds the pdf
documentation using make.

Change-Id: Id93200ae85c25dfb713e96a09d2ee4aea611ed33
Task: 35470
This commit is contained in:
Lukas Piwowarski 2020-09-10 14:32:06 +02:00
parent be7dc8aa49
commit 62c85ecba7
3 changed files with 15 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import os
extensions = [
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinxcontrib.rsvgconverter',
'openstackdocstheme',
'yasfb',
]
@ -188,7 +189,7 @@ htmlhelp_basename = 'QA-Specsdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'QA-specs.tex', u'QA Specs',
('index', 'QA-specs.tex', u'QA Specs Documentation',
u'OpenStack QA Team', 'manual'),
]
@ -291,3 +292,8 @@ epub_copyright = u'2014, OpenStack QA Team'
# Do not warn about non-local image URI
suppress_warnings = ['image.nonlocal_uri']
latex_use_xindy = False
latex_elements = {
'extraclassoptions': 'openany,oneside',
}

View File

@ -3,3 +3,4 @@ docutils>=0.11,!=0.13.1 # OSI-Approved Open Source, Public Domain
sphinx>=2.0.0,!=2.1.0 # BSD
yasfb>=0.5.1
openstackdocstheme>=2.2.1 # Apache-2.0
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

View File

@ -16,6 +16,13 @@ commands = {posargs}
[testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:spelling]
deps =
-r{toxinidir}/requirements.txt