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: I60e1e1b02ced34a7236fca4552ecf2f983cdb9d4
This commit is contained in:
Kaifeng Wang 2019-06-18 11:09:03 +08:00
parent bbaa4599d9
commit 2e25b23539
4 changed files with 15 additions and 10 deletions

View File

@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.18.1 # Apache-2.0
openstackdocstheme>=1.20.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
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

View File

@ -19,8 +19,7 @@ apidoc_separate_modules = True
# openstackdocstheme options
repository_name = 'openstack/python-ironicclient'
bug_project = 'python-ironicclient'
bug_tag = ''
use_storyboard = True
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
@ -36,7 +35,6 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'python-ironicclient'
copyright = u'OpenStack Foundation'
# A list of ignored prefixes for module index sorting.
@ -66,11 +64,10 @@ exclude_patterns = ['api/ironicclient.tests.functional.*']
#html_static_path = ['_static']
html_theme = 'openstackdocs'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
htmlhelp_basename = 'python-ironicclientdoc'
latex_use_xindy = False
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
@ -78,8 +75,8 @@ htmlhelp_basename = '%sdoc' % project
latex_documents = [
(
'index',
'%s.tex' % project,
u'%s Documentation' % project,
'doc-python-ironicclient.tex',
u'Python Ironic Client Documentation',
u'OpenStack LLC',
'manual'
),

View File

@ -41,7 +41,7 @@ msgpack-python==0.4.0
munch==2.1.0
netaddr==0.7.18
netifaces==0.10.4
openstackdocstheme==1.18.1
openstackdocstheme==1.20.0
openstacksdk==0.11.2
os-client-config==1.28.0
os-service-types==1.2.0

View File

@ -74,6 +74,14 @@ deps =
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
[flake8]
ignore =
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools