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: I60e1e1b02ced34a7236fca4552ecf2f983cdb9d4
tags/3.0.0^0
Kaifeng Wang 3 months ago
parent
commit
2e25b23539
4 changed files with 15 additions and 10 deletions
  1. 1
    1
      doc/requirements.txt
  2. 5
    8
      doc/source/conf.py
  3. 1
    1
      lower-constraints.txt
  4. 8
    0
      tox.ini

+ 1
- 1
doc/requirements.txt View File

@@ -1,7 +1,7 @@
1 1
 # The order of packages is significant, because pip processes them in the order
2 2
 # of appearance. Changing the order has an impact on the overall integration
3 3
 # process, which may cause wedges in the gate later.
4
-openstackdocstheme>=1.18.1 # Apache-2.0
4
+openstackdocstheme>=1.20.0 # Apache-2.0
5 5
 reno>=2.5.0 # Apache-2.0
6 6
 sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
7 7
 sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD

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

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

+ 1
- 1
lower-constraints.txt View File

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

+ 8
- 0
tox.ini View File

@@ -74,6 +74,14 @@ deps =
74 74
 commands =
75 75
   sphinx-build -W -b html doc/source doc/build/html
76 76
 
77
+[testenv:pdf-docs]
78
+basepython = python3
79
+whitelist_externals = make
80
+deps = {[testenv:docs]deps}
81
+commands =
82
+  sphinx-build -W -b latex doc/source doc/build/pdf
83
+  make -C doc/build/pdf
84
+
77 85
 [flake8]
78 86
 ignore =
79 87
 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools

Loading…
Cancel
Save