Browse Source

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: I83f264f58543ae90a941afd37567eeb46b4acfcc
tags/3.7.0^0
Kaifeng Wang 11 months ago
parent
commit
d95a4cd30f
4 changed files with 19 additions and 16 deletions
  1. +1
    -0
      doc/requirements.txt
  2. +8
    -16
      doc/source/conf.py
  3. +1
    -0
      lower-constraints.txt
  4. +9
    -0
      tox.ini

+ 1
- 0
doc/requirements.txt View File

@@ -3,3 +3,4 @@ sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.20.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

+ 8
- 16
doc/source/conf.py View File

@@ -7,17 +7,12 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinxcontrib.apidoc',
'sphinx.ext.viewcode',
'sphinxcontrib.rsvgconverter',
'openstackdocstheme',
]

try:
import openstackdocstheme
extensions.append('openstackdocstheme')
except ImportError:
openstackdocstheme = None

repository_name = 'openstack/python-ironic-inspector-client'
bug_project = 'python-ironic-inspector-client'
bug_tag = ''
use_storyboard = True

wsme_protocols = ['restjson']

@@ -41,7 +36,6 @@ source_suffix = '.rst'
master_doc = 'index'

# General information about the project.
project = u'Ironic Inspector Client'
copyright = u'OpenStack Foundation'

# A list of ignored prefixes for module index sorting.
@@ -61,17 +55,15 @@ pygments_style = 'sphinx'

# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
if openstackdocstheme is not None:
html_theme = 'openstackdocs'
else:
html_theme = 'default'
html_theme = 'openstackdocs'
#html_theme_path = ["."]
#html_theme = '_theme'
#html_static_path = ['_static']

# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
htmlhelp_basename = 'python-ironic-inspector-clientdoc'

latex_use_xindy = False

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
@@ -79,8 +71,8 @@ htmlhelp_basename = '%sdoc' % project
latex_documents = [
(
'index',
'%s.tex' % project,
u'%s Documentation' % project,
'doc-python-ironic-inspector-client.tex',
u'Python Ironic Inspector Client Documentation',
u'OpenStack Foundation',
'manual'
),


+ 1
- 0
lower-constraints.txt View File

@@ -76,6 +76,7 @@ simplejson==3.5.1
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-svg2pdfconverter==0.1.0
sphinxcontrib-websupport==1.0.1
stevedore==1.20.0
testtools==2.2.0


+ 9
- 0
tox.ini View File

@@ -13,6 +13,7 @@ commands =
coverage run --branch --include "ironic_inspector_client*" -m unittest discover ironic_inspector_client.test
coverage report -m --fail-under 90
setenv = PYTHONDONTWRITEBYTECODE=1
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:pep8]
basepython = python3
@@ -70,6 +71,14 @@ 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

[flake8]
import-order-style = pep8
application-import-names = ironic_inspector_client


Loading…
Cancel
Save