PDF Documentation Build tox target

Change-Id: Ie55138d08d45945fdc00583dfb53458e6f2e3c48
Signed-off-by: sonpn13 <sonpn13@viettel.com.vn>
Story: 2006105
Task: 35338
This commit is contained in:
sonpn13 2019-10-27 09:51:59 +07:00 committed by Marc Gariepy
parent 8c5b23836a
commit d4d17d6af2
2 changed files with 26 additions and 8 deletions

View File

@ -38,6 +38,7 @@
extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
'sphinxcontrib.rsvgconverter',
]
# Add any paths that contain templates here, relative to this directory.
@ -62,10 +63,11 @@ description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
project = 'OpenStack-Ansible'
role_name = 'rsyslog_client'
target_name = 'openstack-ansible-' + role_name
title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
title = 'OpenStack-Ansible Documentation: ' + role_name + ' role'
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/' + target_name
openstackdocs_pdf_link = True
openstackdocs_bug_project = project.lower()
openstackdocs_bug_tag = ''
@ -228,10 +230,12 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, target_name + '.tex',
title, author, 'manual'),
(master_doc, 'doc-' + target_name + '.tex',
title.replace("_", r"\_"), author, 'manual'),
]
latex_use_xindy = False
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
@ -288,3 +292,11 @@ texinfo_documents = [
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
# -- Options for PDF output --------------------------------------------------
pdf_documents = [
(master_doc, target_name,
title, author)
]
locale_dirs = ['locale/']

16
tox.ini
View File

@ -21,7 +21,7 @@ passenv =
TESTING_BRANCH
TESTING_HOME
USER
whitelist_externals =
allowlist_externals =
bash
setenv =
PYTHONUNBUFFERED=1
@ -31,14 +31,20 @@ setenv =
WORKING_DIR={toxinidir}
[testenv:docs]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands=
deps = -r{toxinidir}/doc/requirements.txt
commands =
bash -c "rm -rf doc/build"
doc8 doc
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
allowlist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[doc8]
# Settings for doc8:
extensions = .rst