Set lock_path correctly.
[openstack-build/neutron-build.git] / doc / source / conf.py
1 # -*- coding: utf-8 -*-
2 # Copyright (c) 2010 OpenStack Foundation.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 # implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 #
18 # Keystone documentation build configuration file, created by
19 # sphinx-quickstart on Tue May 18 13:50:15 2010.
20 #
21 # This file is execfile()'d with the current directory set to it's containing
22 # dir.
23 #
24 # Note that not all possible configuration values are present in this
25 # autogenerated file.
26 #
27 # All configuration values have a default; values that are commented out
28 # serve to show the default.
29
30 import os
31 import subprocess
32 import sys
33
34 # If extensions (or modules to document with autodoc) are in another directory,
35 # add these directories to sys.path here. If the directory is relative to the
36 # documentation root, use os.path.abspath to make it absolute, like shown here.
37 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
38 NEUTRON_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
39 sys.path.insert(0, NEUTRON_DIR)
40
41 # -- General configuration ---------------------------------------------------
42
43 # Add any Sphinx extension module names here, as strings. They can be
44 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
45 extensions = ['sphinx.ext.autodoc',
46               'sphinx.ext.coverage',
47               'sphinx.ext.ifconfig',
48               'sphinx.ext.pngmath',
49               'sphinx.ext.graphviz',
50               'sphinx.ext.todo',
51               'oslosphinx']
52
53 todo_include_todos = True
54
55 # Add any paths that contain templates here, relative to this directory.
56 templates_path = []
57 if os.getenv('HUDSON_PUBLISH_DOCS'):
58     templates_path = ['_ga', '_templates']
59 else:
60     templates_path = ['_templates']
61
62 # The suffix of source filenames.
63 source_suffix = '.rst'
64
65 # The encoding of source files.
66 #source_encoding = 'utf-8'
67
68 # The master toctree document.
69 master_doc = 'index'
70
71 # General information about the project.
72 project = u'Neutron'
73 copyright = u'2011-present, OpenStack Foundation.'
74
75 # The version info for the project you're documenting, acts as replacement for
76 # |version| and |release|, also used in various other places throughout the
77 # built documents.
78 #
79 # Version info
80 from neutron.version import version_info as neutron_version
81 release = neutron_version.release_string()
82 # The short X.Y version.
83 version = neutron_version.version_string()
84
85 # The language for content autogenerated by Sphinx. Refer to documentation
86 # for a list of supported languages.
87 #language = None
88
89 # There are two options for replacing |today|: either, you set today to some
90 # non-false value, then it is used:
91 #today = ''
92 # Else, today_fmt is used as the format for a strftime call.
93 #today_fmt = '%B %d, %Y'
94
95 # List of documents that shouldn't be included in the build.
96 # unused_docs = []
97
98 # List of directories, relative to source directory, that shouldn't be searched
99 # for source files.
100 exclude_trees = []
101
102 # The reST default role (for this markup: `text`) to use for all documents.
103 #default_role = None
104
105 # If true, '()' will be appended to :func: etc. cross-reference text.
106 #add_function_parentheses = True
107
108 # If true, the current module name will be prepended to all description
109 # unit titles (such as .. function::).
110 #add_module_names = True
111
112 # If true, sectionauthor and moduleauthor directives will be shown in the
113 # output. They are ignored by default.
114 show_authors = True
115
116 # The name of the Pygments (syntax highlighting) style to use.
117 pygments_style = 'sphinx'
118
119 # A list of ignored prefixes for module index sorting.
120 modindex_common_prefix = ['neutron.']
121
122 # -- Options for HTML output -------------------------------------------------
123
124 # The theme to use for HTML and HTML Help pages.  Major themes that come with
125 # Sphinx are currently 'default' and 'sphinxdoc'.
126 # html_theme_path = ["."]
127 # html_theme = '_theme'
128
129 # Theme options are theme-specific and customize the look and feel of a theme
130 # further.  For a list of options available for each theme, see the
131 # documentation.
132 #html_theme_options = {}
133
134 # Add any paths that contain custom themes here, relative to this directory.
135 #html_theme_path = ['_theme']
136
137 # The name for this set of Sphinx documents.  If None, it defaults to
138 # "<project> v<release> documentation".
139 #html_title = None
140
141 # A shorter title for the navigation bar.  Default is the same as html_title.
142 #html_short_title = None
143
144 # The name of an image file (relative to this directory) to place at the top
145 # of the sidebar.
146 #html_logo = None
147
148 # The name of an image file (within the static path) to use as favicon of the
149 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
150 # pixels large.
151 #html_favicon = None
152
153 # Add any paths that contain custom static files (such as style sheets) here,
154 # relative to this directory. They are copied after the builtin static files,
155 # so a file named "default.css" will overwrite the builtin "default.css".
156 # html_static_path = ['_static']
157
158 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
159 # using the given strftime format.
160 #html_last_updated_fmt = '%b %d, %Y'
161 git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local -",
162    "n1"]
163 html_last_updated_fmt = subprocess.Popen(git_cmd,
164                                          stdout=subprocess.PIPE).\
165                                          communicate()[0]
166
167 # If true, SmartyPants will be used to convert quotes and dashes to
168 # typographically correct entities.
169 #html_use_smartypants = True
170
171 # Custom sidebar templates, maps document names to template names.
172 #html_sidebars = {}
173
174 # Additional templates that should be rendered to pages, maps page names to
175 # template names.
176 #html_additional_pages = {}
177
178 # If false, no module index is generated.
179 #html_use_modindex = True
180
181 # If false, no index is generated.
182 #html_use_index = True
183
184 # If true, the index is split into individual pages for each letter.
185 #html_split_index = False
186
187 # If true, links to the reST sources are added to the pages.
188 #html_show_sourcelink = True
189
190 # If true, an OpenSearch description file will be output, and all pages will
191 # contain a <link> tag referring to it.  The value of this option must be the
192 # base URL from which the finished HTML is served.
193 #html_use_opensearch = ''
194
195 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
196 #html_file_suffix = ''
197
198 # Output file base name for HTML help builder.
199 htmlhelp_basename = 'neutrondoc'
200
201
202 # -- Options for LaTeX output ------------------------------------------------
203
204 # The paper size ('letter' or 'a4').
205 #latex_paper_size = 'letter'
206
207 # The font size ('10pt', '11pt' or '12pt').
208 #latex_font_size = '10pt'
209
210 # Grouping the document tree into LaTeX files. List of tuples
211 # (source start file, target name, title, author,
212 # documentclass [howto/manual]).
213 latex_documents = [
214     ('index', 'Neutron.tex', u'Neutron Documentation',
215      u'Neutron development team', 'manual'),
216 ]
217
218 # The name of an image file (relative to this directory) to place at the top of
219 # the title page.
220 #latex_logo = None
221
222 # For "manual" documents, if this is true, then toplevel headings are parts,
223 # not chapters.
224 #latex_use_parts = False
225
226 # Additional stuff for the LaTeX preamble.
227 #latex_preamble = ''
228
229 # Documents to append as an appendix to all manuals.
230 #latex_appendices = []
231
232 # If false, no module index is generated.
233 #latex_use_modindex = True