Create tox environment to build pdf documentation
This patch enables building .pdf documentation using new 'pdf-docs' tox environment. The newly created tox environment creates latex source codes using sphinx-build and then builds the pdf documentation using make. Story: 2006070 Task: 35471 Change-Id: I44b0dde9cec10359dd41cbf9a2d9b034a831f106
This commit is contained in:
parent
71c4ef61a7
commit
ee58754040
@ -4,3 +4,4 @@
|
||||
openstackdocstheme>=2.2.1 # Apache-2.0
|
||||
reno>=3.1.0 # Apache-2.0
|
||||
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||
|
@ -23,7 +23,8 @@ sys.path.insert(0, os.path.abspath('../..'))
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
#'sphinx.ext.intersphinx',
|
||||
'openstackdocstheme'
|
||||
'openstackdocstheme',
|
||||
'sphinxcontrib.rsvgconverter'
|
||||
]
|
||||
|
||||
# openstackdocstheme options
|
||||
@ -31,6 +32,7 @@ openstackdocs_repo_name = 'openstack/stackviz'
|
||||
openstackdocs_auto_name = False
|
||||
openstackdocs_bug_project = 'stackviz'
|
||||
openstackdocs_bug_tag = ''
|
||||
openstackdocs_pdf_link = True
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
# text edit cycles.
|
||||
@ -78,3 +80,19 @@ latex_documents = [
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
#intersphinx_mapping = {'http://docs.python.org/': None}
|
||||
|
||||
# -- Options for LaTeX output -------------------------------------------------
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'doc-stackviz.tex', u'Stackviz',
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
|
||||
# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
|
||||
latex_use_xindy = False
|
||||
latex_elements = {
|
||||
'extraclassoptions': 'openany,oneside',
|
||||
}
|
||||
|
9
tox.ini
9
tox.ini
@ -34,13 +34,20 @@ commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||
[testenv:docs]
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
rm -rf doc/build
|
||||
sphinx-build -W -b html doc/source doc/build/html
|
||||
whitelist_externals = rm
|
||||
|
||||
[testenv:pdf-docs]
|
||||
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]
|
||||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user