summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishakha Agarwal <agarwalvishakha18@gmail.com>2019-08-30 10:37:06 +0530
committerVishakha Agarwal <agarwalvishakha18@gmail.com>2019-09-04 11:09:34 +0530
commitf27e6467e7c5cc0b072c59896c9efc281888e6f3 (patch)
tree944d0f2de95182dedcc8ee6a7e955bca6b92fb8b
parentf7e75f43d811c8e1028746b2574322afa53dbaac (diff)
downloadpython-keystoneclient-f27e6467e7c5cc0b072c59896c9efc281888e6f3.tar.gz
Generate pdf documentation
This patch adds a new tox job/command for building the pdf version of documentation. tox -epdf-docs Change-Id: I0c0ef99190ea2a834bfdb47eb443b88a93bc802c
-rw-r--r--doc/source/conf.py19
-rw-r--r--tox.ini12
2 files changed, 27 insertions, 4 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index c5b98f9..8fb3dba 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -180,10 +180,9 @@ htmlhelp_basename = 'python-keystoneclientdoc'
# (source start file, target name, title, author, documentclass [howto/manual])
# .
latex_documents = [
- ('index', 'python-keystoneclient.tex',
- 'python-keystoneclient Documentation',
- 'Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
- 'manual'),
+ ('index', 'doc-python-keystoneclient.tex',
+ u'python-keystoneclient Documentation',
+ u'OpenStack', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -203,6 +202,18 @@ latex_documents = [
# If false, no module index is generated.
#latex_use_modindex = True
+# 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}',
+ 'maxlistdepth': 10,
+}
+
keystoneauth_url = 'https://docs.openstack.org/keystoneauth/latest/'
intersphinx_mapping = {
'python': ('https://docs.python.org/', None),
diff --git a/tox.ini b/tox.ini
index e511675..374893c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -71,6 +71,18 @@ basepython = python3
commands = python setup.py build_sphinx
deps = -r{toxinidir}/doc/requirements.txt
+[testenv:pdf-docs]
+basepython = python3
+envdir = {toxworkdir}/docs
+deps = {[testenv:docs]deps}
+whitelist_externals =
+ make
+ rm
+commands =
+ rm -rf doc/build/pdf
+ sphinx-build -W -b latex doc/source doc/build/pdf
+ make -C doc/build/pdf
+
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html