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.

Story: 2006070
Task: 35470

Change-Id: Id93200ae85c25dfb713e96a09d2ee4aea611ed33
This commit is contained in:
Lukas Piwowarski 2020-09-10 14:32:06 +02:00
parent be7dc8aa49
commit 3349e897b9
3 changed files with 16 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import os
extensions = [
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinxcontrib.rsvgconverter',
'openstackdocstheme',
'yasfb',
]
@ -68,6 +69,7 @@ copyright = u'%s, OpenStack QA Team' % datetime.date.today().year
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/qa-specs'
openstackdocs_auto_name = False
openstackdocs_pdf_link = True
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -188,10 +190,15 @@ 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', 'doc-qa-specs.tex', u'QA Specs Documentation',
u'OpenStack QA Team', 'manual'),
]
latex_use_xindy = False
latex_elements = {
'extraclassoptions': 'openany,oneside',
}
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None

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