Build pdf doc

One of community goals is that each project should produce a single PDF
file. The pdf should be in the output of the openstack-tox-docs job.

TeX packages are required to build PDF locally, the following are
recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:

* https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
* https://etherpad.openstack.org/p/train-pdf-support-goal
* https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: If9850d8275e8c4f46b393b2cdd91c8963b9844a1
Story: 2006073
Task: 34795
This commit is contained in:
Pierre Riteau 2019-09-19 10:03:44 +02:00
parent af61048131
commit 06d102c655
2 changed files with 16 additions and 1 deletions

View File

@ -188,10 +188,13 @@ htmlhelp_basename = 'BlazarDoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'blazardoc.tex', u'Blazar',
('index', 'doc-blazar.tex', u'Blazar Documentation',
u'OpenStack Foundation', 'manual'),
]
# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
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

12
tox.ini
View File

@ -33,11 +33,23 @@ commands = {posargs}
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
rm -rf doc/html doc/build
rm -rf doc/source/apidoc doc/source/api
python setup.py build_sphinx
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals = make
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file=etc/blazar/blazar-config-generator.conf