aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2019-09-17 11:50:41 +0100
committerMark Goddard <mark@stackhpc.com>2019-09-17 14:25:32 +0100
commit75e7bd530d31c7b8c8544952534122db5bf53c61 (patch)
tree19dad80f064e972c697299098ad295b3d8d65d01
parent20a5957a41ac63ed0313aac8216df9fefb0ab0aa (diff)
downloadkolla-75e7bd530d31c7b8c8544952534122db5bf53c61.tar.gz
kolla-75e7bd530d31c7b8c8544952534122db5bf53c61.zip
Build pdf doc
The is one of community goals that each project should produce a single PDF file. The pdf should be in the output of openstack-tox-docs job. TeX packages are required to build PDF locally, following is 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: Ia0f8b73bcbda6295319f5c8de1aa02a40844207b
-rw-r--r--doc/requirements.txt1
-rw-r--r--doc/source/conf.py6
-rw-r--r--lower-constraints.txt1
-rw-r--r--tox.ini8
4 files changed, 15 insertions, 1 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 9f2147d3d..ce8957d82 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -6,3 +6,4 @@ openstackdocstheme>=1.19.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
+sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 862ab85e9..cd5045caf 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -23,6 +23,7 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
+ 'sphinxcontrib.rsvgconverter',
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@@ -79,11 +80,14 @@ html_last_updated_fmt = '%Y-%m-%d %H:%M'
# [howto/manual]).
latex_documents = [
('index',
- '%s.tex' % project,
+ 'doc-%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]
+# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
+latex_use_xindy = False
+
# openstackdocstheme options
repository_name = 'openstack/kolla'
bug_project = 'kolla'
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 4c7337c8f..2d24ad02b 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -86,6 +86,7 @@ simplejson==3.13.2
six==1.10.0
smmap2==2.0.3
smmap==0.9.0
+sphinxcontrib-svg2pdfconverter==0.1.0
stevedore==1.28.0
stestr==2.2.0
testscenarios==0.4
diff --git a/tox.ini b/tox.ini
index 1dea5f77b..f232e52c7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -75,6 +75,14 @@ commands =
doc8 doc
sphinx-build -W -b html doc/source doc/build/html
+[testenv:pdf-docs]
+basepython = python3
+whitelist_externals = make
+deps = {[testenv:docs]deps}
+commands =
+ sphinx-build -W -b latex doc/source doc/build/pdf
+ make -C doc/build/pdf
+
[testenv:build-centos-binary]
whitelist_externals = find
bash