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: I784be3f2462184ce951cb27e68e578f8befaa580
This commit is contained in:
Kaifeng Wang 2019-09-06 15:25:44 +08:00
parent fcf684ad03
commit 76cbd2dbbb
5 changed files with 28 additions and 12 deletions

View File

@ -7,6 +7,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinxcontrib.rsvgconverter',
'oslo_policy.sphinxext',
'oslo_policy.sphinxpolicygen',
'oslo_config.sphinxext',
@ -19,9 +20,7 @@ except ImportError:
openstackdocstheme = None
repository_name = 'openstack/ironic-inspector'
bug_project = 'ironic-inspector'
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
use_storyboard = True
wsme_protocols = ['restjson']
@ -39,8 +38,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Ironic Inspector'
copyright = u'OpenStack Foundation'
copyright = u'OpenStack Developers'
config_generator_config_file = '../../tools/config-generator.conf'
sample_config_basename = '_static/ironic-inspector'
@ -92,8 +90,9 @@ else:
#html_static_path = ['_static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
htmlhelp_basename = 'ironic-inspectordoc'
latex_use_xindy = False
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
@ -101,8 +100,8 @@ htmlhelp_basename = '%sdoc' % project
latex_documents = [
(
'index',
'%s.tex' % project,
u'%s Documentation' % project,
'doc-ironic-inspector.tex',
u'Ironic Inspector Documentation',
u'OpenStack Foundation',
'manual'
),

View File

@ -8,8 +8,15 @@ file. The overview of configuration file options follow.
:maxdepth: 1
Ironic Inspector Configuration Options <ironic-inspector>
Sample Ironic Inspector Configuration <sample-config>
Policies <policy>
Sample policy file <sample-policy>
.. only:: html
Sample files
------------
.. toctree::
:maxdepth: 1
Sample Ironic Inspector Configuration <sample-config>
Sample policy file <sample-policy>

View File

@ -55,7 +55,7 @@ msgpack==0.5.6
munch==2.2.0
netaddr==0.7.18
netifaces==0.10.6
openstackdocstheme==1.18.1
openstackdocstheme==1.20.0
openstacksdk==0.30.0
os-api-ref==1.4.0
os-client-config==1.29.0
@ -111,6 +111,7 @@ simplejson==3.13.2
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-svg2pdfconverter==0.1.0
sphinxcontrib-websupport==1.0.1
sqlalchemy-migrate==0.11.0
SQLAlchemy==1.0.10

View File

@ -9,7 +9,8 @@ hacking>=1.0.0,<1.2.0 # Apache-2.0
mock>=3.0.0 # BSD
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
openstackdocstheme>=1.18.1 # Apache-2.0
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
openstackdocstheme>=1.20.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0

View File

@ -97,6 +97,14 @@ deps = -r{toxinidir}/test-requirements.txt
commands =
python setup.py build_sphinx
[testenv:pdf-docs]
basepython = python3
whitelist_externals = make
deps = {[testenv:docs]deps}
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:lower-constraints]
basepython = python3
deps =