Generate PDF documentation
This commit adds a new tox target to build PDF documentation. It's a part of community goal, see storyboard for more information. Change-Id: I04b9253ae30ec125e45a272f0c7ce384c7770372 Story: 2006076 Task: 35607
This commit is contained in:
parent
f66683c01c
commit
eca15c1c40
2
doc/requirements.txt
Normal file
2
doc/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
openstackdocstheme>=1.30.0 # Apache-2.0
|
||||||
|
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
@ -23,6 +23,7 @@ extensions = [
|
|||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
# 'sphinx.ext.intersphinx',
|
# 'sphinx.ext.intersphinx',
|
||||||
'openstackdocstheme',
|
'openstackdocstheme',
|
||||||
|
'sphinxcontrib.rsvgconverter'
|
||||||
]
|
]
|
||||||
|
|
||||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||||
@ -64,14 +65,27 @@ htmlhelp_basename = '%sdoc' % project
|
|||||||
# html_last_updated_fmt = '%b %d, %Y'
|
# html_last_updated_fmt = '%b %d, %Y'
|
||||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||||
|
|
||||||
|
# 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}',
|
||||||
|
}
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
# (source start file, target name, title, author, documentclass
|
# (source start file, target name, title, author, documentclass
|
||||||
# [howto/manual]).
|
# [howto/manual]).
|
||||||
|
# NOTE: Specify toctree_only=True for a better document structure of
|
||||||
|
# the generated PDF file.
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index',
|
('index',
|
||||||
'%s.tex' % project,
|
'doc-%s.tex' % project,
|
||||||
u'%s Documentation' % project,
|
u'%s Documentation' % project,
|
||||||
u'OpenStack Foundation', 'manual'),
|
u'OpenStack Foundation', 'manual', True),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Example configuration for intersphinx: refer to the Python standard library.
|
# Example configuration for intersphinx: refer to the Python standard library.
|
||||||
|
13
tox.ini
13
tox.ini
@ -59,7 +59,18 @@ commands = python setup.py test --coverage --testr-args='{posargs}'
|
|||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands = python setup.py build_sphinx
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
|
commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
||||||
|
|
||||||
|
[testenv:pdf-docs]
|
||||||
|
basepython = python3
|
||||||
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
|
envdir = {toxworkdir}/docs
|
||||||
|
whitelist_externals =
|
||||||
|
make
|
||||||
|
commands =
|
||||||
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
||||||
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user