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: 35466 Change-Id: Iefa8795ba985f502f952001cdc616dae20847ef9
This commit is contained in:
parent
6506c4d406
commit
4f14a185aa
|
@ -4,3 +4,4 @@
|
||||||
openstackdocstheme>=2.2.1 # Apache-2.0
|
openstackdocstheme>=2.2.1 # Apache-2.0
|
||||||
reno>=3.1.0 # Apache-2.0
|
reno>=3.1.0 # Apache-2.0
|
||||||
sphinx>=2.0.0,!=2.1.0 # BSD
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
|
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.todo',
|
'sphinx.ext.todo',
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
|
'sphinxcontrib.rsvgconverter',
|
||||||
'openstackdocstheme'
|
'openstackdocstheme'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ copyright = u'2015-2019, OpenStack Foundation'
|
||||||
openstackdocs_repo_name = 'openstack/openstack-health'
|
openstackdocs_repo_name = 'openstack/openstack-health'
|
||||||
openstackdocs_bug_project = 'openstack-health'
|
openstackdocs_bug_project = 'openstack-health'
|
||||||
openstackdocs_bug_tag = ''
|
openstackdocs_bug_tag = ''
|
||||||
|
openstackdocs_pdf_link = True
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@ -161,15 +163,22 @@ latex_elements = {
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
#'preamble': '',
|
#'preamble': '',
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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 [howto/manual]).
|
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'openstack-health.tex', u'OpenStack-Health Documentation',
|
('index', 'doc-openstack-health.tex', u'OpenStack-Health Documentation',
|
||||||
u'OpenStack Foundation', 'manual'),
|
u'OpenStack Foundation', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
latex_use_xindy = False
|
||||||
|
latex_elements = {
|
||||||
|
'extraclassoptions': 'openany,oneside',
|
||||||
|
}
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
# the title page.
|
# the title page.
|
||||||
#latex_logo = None
|
#latex_logo = None
|
||||||
|
|
12
tox.ini
12
tox.ini
|
@ -19,14 +19,20 @@ commands =
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
-r{toxinidir}/doc/requirements.txt
|
|
||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
sphinx-build -W -b html doc/source doc/build/html
|
sphinx-build -W -b html doc/source doc/build/html
|
||||||
whitelist_externals = rm
|
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:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands =
|
||||||
flake8 {toxinidir}/openstack_health {posargs}
|
flake8 {toxinidir}/openstack_health {posargs}
|
||||||
|
|
Loading…
Reference in New Issue