Build pdf doc

The is one of community goals that each project could produce a
single PDF file. The pdf should be in the output of openstack-tox-docs
job.

TeX packages are required to build PDF locally, following is recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:
https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
https://etherpad.openstack.org/p/train-pdf-support-goal
https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: Iebca5c4cc8dfdecf7c561b3612691b62ca4ac0c8
This commit is contained in:
Kaifeng Wang 2019-06-18 10:51:04 +08:00
parent b8f8c88bf4
commit 0bc77a53c0
4 changed files with 15 additions and 10 deletions

View File

@ -2,6 +2,7 @@ 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,>=1.6.2;python_version>='3.4' # BSD
sphinxcontrib-httpdomain>=1.3.0 # BSD
sphinxcontrib-blockdiag>=1.5.4 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
reno>=2.5.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0
openstackdocstheme>=1.20.0 # Apache-2.0

View File

@ -22,6 +22,7 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'sphinxcontrib.rsvgconverter',
'openstackdocstheme'
]
@ -36,7 +37,6 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'bifrost'
copyright = u'2015, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
@ -60,22 +60,18 @@ html_theme = 'openstackdocs'
# openstackdocstheme options
repository_name = 'openstack/bifrost'
bug_project = '941'
bug_tag = 'doc'
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
use_storyboard = True
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
htmlhelp_basename = 'bifrostdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
'doc-bifrost.tex',
u'Bifrost Documentation',
u'OpenStack Foundation', 'manual'),
]

View File

@ -65,6 +65,7 @@ six==1.11.0
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1
sphinxcontrib-svg2pdfconverter==0.1.0
stevedore==1.28.0
testrepository==0.0.18
testscenarios==0.4

View File

@ -38,6 +38,13 @@ deps =
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
whitelist_externals = make
deps = {[testenv:docs]deps}
commands = sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t bifrost/tests {posargs}