From 1d1f28a256f01ec41743977d16ffc9a62cd9362a Mon Sep 17 00:00:00 2001 From: licanwei Date: Tue, 17 Sep 2019 00:20:25 -0700 Subject: [PATCH] Build pdf docs Add a new pdf-docs environment to enable PDF build. Change-Id: I59bdc7cf339b022458b3b0d1fa3b694b7998c20f --- doc/source/conf.py | 11 +++++++++++ tox.ini | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 54bf344..3bcea91 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -88,6 +88,17 @@ latex_documents = [ ), ] +# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 +latex_use_xindy = False + +latex_domain_indices = False + +latex_elements = { + 'makeindex': '', + 'printindex': '', + 'preamble': r'\setcounter{tocdepth}{3}', +} + # openstackdocstheme options repository_name = 'openstack/python-watcherclient' bug_project = 'python-watcherclient' diff --git a/tox.ini b/tox.ini index a21f2aa..42030aa 100644 --- a/tox.ini +++ b/tox.ini @@ -48,6 +48,18 @@ deps = -r{toxinidir}/doc/requirements.txt commands = python setup.py build_sphinx +[testenv:pdf-docs] +basepython = python3 +envdir = {toxworkdir}/docs +deps = {[testenv:docs]deps} +whitelist_externals = + rm + make +commands = + rm -rf doc/build/pdf + sphinx-build -W -b latex doc/source doc/build/pdf + make -C doc/build/pdf + [testenv:debug] basepython = python3 commands = oslo_debug_helper -t watcherclient/tests/unit {posargs}