Add PDF documentation build

This commit adds PDF documentation build target 'pdf-docs' that will
build PDF versions of our docs. And this commit also updates 'docs'
target to use sphinx-build command as well as 'pdf-docs' target.

This is one of the Train community goals:

 https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Change-Id: Iae6bc9ae92fe61385c424923eaad35dc449880e9
Story: #2006070
Task: #35455
This commit is contained in:
Masayuki Igawa 2019-10-02 18:48:31 +09:00
parent 696e2b5256
commit 1f3763636b
No known key found for this signature in database
GPG Key ID: 290F53EDC899BF89
4 changed files with 23 additions and 5 deletions

View File

@ -1,6 +1,8 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.18.1 # Apache-2.0
openstackdocstheme>=1.20.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
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

View File

@ -22,6 +22,7 @@ sys.path.insert(0, os.path.abspath('../..'))
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.rsvgconverter',
'openstackdocstheme'
]
@ -73,7 +74,7 @@ htmlhelp_basename = '%sdoc' % project
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
'doc-%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
]

View File

@ -26,4 +26,10 @@ if your coverage rate is down.
Indices and tables
==================
* :ref:`search`
.. only:: html
* :ref:`Coverage2SQL document search <search>`: Search the contents of this
document.
* `OpenStack wide search <https://docs.openstack.org>`_: Search the wider
set of OpenStack documentation, including forums.

11
tox.ini
View File

@ -45,7 +45,16 @@ deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:debug]
basepython = python3