Debian Codegraph @

doc/conf.py

raw
1 # -*- coding: utf-8 -*-
2 #
3 # dh-virtualenv documentation build configuration file, created by
4 # sphinx-quickstart on Wed Feb 20 17:29:43 2013.
5 #
6 # This file is execfile()d with the current directory set to its containing dir.
7 #
8 # Note that not all possible configuration values are present in this
9 # autogenerated file.
10 #
11 # All configuration values have a default; values that are commented out
12 # serve to show the default.
13
14 import os
15 import re
16 import sys
17
18 # If extensions (or modules to document with autodoc) are in another directory,
19 # add these directories to sys.path here. If the directory is relative to the
20 # documentation root, use os.path.abspath to make it absolute, like shown here.
21 sys.path.insert(0, os.path.abspath(".."))
22 from setup import project as meta
23
24 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
25 if not on_rtd:
26 import sphinx_rtd_theme
27
28 # https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html
29 def setup(app):
30 app.add_stylesheet('css/custom.css')
31 #app.add_javascript('js/custom.js')
32
33
34 # -- General configuration -----------------------------------------------------
35
36 # If your documentation needs a minimal Sphinx version, state it here.
37 #needs_sphinx = '1.0'
38
39 # Add any Sphinx extension module names here, as strings. They can be extensions
40 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
41 extensions = [
42 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage',
43 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon',
44 ]
45
46 # Add any paths that contain templates here, relative to this directory.
47 templates_path = ['_templates']
48
49 # The suffix of source filenames.
50 source_suffix = '.rst'
51
52 # The encoding of source files.
53 #source_encoding = 'utf-8-sig'
54
55 # The master toctree document.
56 master_doc = 'index'
57
58 # General information about the project.
59 project = meta["name"]
60 copyright = u'2013-2018 Spotify AB and contributors'
61
62 # The version info for the project you're documenting, acts as replacement for
63 # |version| and |release|, also used in various other places throughout the
64 # built documents.
65
66 # The full version, including alpha/beta/rc tags.
67 release = meta["version"]
68 # The short X.Y version.
69 version = '.'.join(re.split("[^\d]+", release)[:2])
70
71 # The language for content autogenerated by Sphinx. Refer to documentation
72 # for a list of supported languages.
73 #language = None
74
75 # There are two options for replacing |today|: either, you set today to some
76 # non-false value, then it is used:
77 #today = ''
78 # Else, today_fmt is used as the format for a strftime call.
79 today_fmt = '%Y-%m-%d'
80
81 # List of patterns, relative to source directory, that match files and
82 # directories to ignore when looking for source files.
83 exclude_patterns = [
84 '*~',
85 '_build',
86 'LICENSE.rst',
87 'README.rst',
88 'modules.rst',
89 'dh_virtualenv.1.rst',
90 'api/modules.rst',
91 ]
92
93 # The reST default role (used for this markup: `text`) to use for all documents.
94 #default_role = None
95
96 # If true, '()' will be appended to :func: etc. cross-reference text.
97 #add_function_parentheses = True
98
99 # If true, the current module name will be prepended to all description
100 # unit titles (such as .. function::).
101 #add_module_names = True
102
103 # If true, sectionauthor and moduleauthor directives will be shown in the
104 # output. They are ignored by default.
105 #show_authors = False
106
107 # The name of the Pygments (syntax highlighting) style to use.
108 pygments_style = 'sphinx'
109
110 # A list of ignored prefixes for module index sorting.
111 #modindex_common_prefix = []
112
113 # Napoleon settings
114 napoleon_numpy_docstring = False
115
116
117 # -- Options for HTML output ---------------------------------------------------
118
119 # The theme to use for HTML and HTML Help pages. See the documentation for
120 # a list of builtin themes.
121 html_theme = 'default'
122 if not on_rtd:
123 # The theme to use for HTML and HTML Help pages. See the documentation for
124 # a list of builtin themes.
125 html_theme = 'sphinx_rtd_theme'
126
127 # Add any paths that contain custom themes here, relative to this directory.
128 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
129
130 # Theme options are theme-specific and customize the look and feel of a theme
131 # further. For a list of options available for each theme, see the
132 # documentation.
133 #html_theme_options = {}
134
135 # Add any paths that contain custom themes here, relative to this directory.
136 #html_theme_path = []
137
138 # The name for this set of Sphinx documents. If None, it defaults to
139 # "<project> v<release> documentation".
140 #html_title = None
141
142 # A shorter title for the navigation bar. Default is the same as html_title.
143 #html_short_title = None
144
145 # The name of an image file (relative to this directory) to place at the top
146 # of the sidebar.
147 ##html_logo = '_static/img/logo-180px.png'
148
149 # The name of an image file (within the static path) to use as favicon of the
150 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
151 # pixels large.
152 #html_favicon = None
153
154 # Add any paths that contain custom static files (such as style sheets) here,
155 # relative to this directory. They are copied after the builtin static files,
156 # so a file named "default.css" will overwrite the builtin "default.css".
157 html_static_path = ['_static']
158
159 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
160 # using the given strftime format.
161 html_last_updated_fmt = '%Y-%m-%d'
162
163 # If true, SmartyPants will be used to convert quotes and dashes to
164 # typographically correct entities.
165 html_use_smartypants = True
166
167 # Custom sidebar templates, maps document names to template names.
168 #html_sidebars = {}
169
170 # Additional templates that should be rendered to pages, maps page names to
171 # template names.
172 #html_additional_pages = {}
173
174 # If false, no module index is generated.
175 #html_domain_indices = True
176
177 # If false, no index is generated.
178 html_use_index = True
179
180 # If true, the index is split into individual pages for each letter.
181 #html_split_index = False
182
183 # If true, links to the reST sources are added to the pages.
184 #html_show_sourcelink = True
185
186 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
187 #html_show_sphinx = True
188
189 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
190 #html_show_copyright = True
191
192 # If true, an OpenSearch description file will be output, and all pages will
193 # contain a <link> tag referring to it. The value of this option must be the
194 # base URL from which the finished HTML is served.
195 #html_use_opensearch = ''
196
197 # This is the file name suffix for HTML files (e.g. ".xhtml").
198 #html_file_suffix = None
199
200 # Output file base name for HTML help builder.
201 htmlhelp_basename = 'dh-virtualenvdoc'
202
203
204 # -- Options for LaTeX output --------------------------------------------------
205
206 latex_elements = {
207 # The paper size ('letterpaper' or 'a4paper').
208 #'papersize': 'letterpaper',
209
210 # The font size ('10pt', '11pt' or '12pt').
211 #'pointsize': '10pt',
212
213 # Additional stuff for the LaTeX preamble.
214 #'preamble': '',
215 }
216
217 # Grouping the document tree into LaTeX files. List of tuples
218 # (source start file, target name, title, author, documentclass [howto/manual]).
219 latex_documents = [
220 ('index', 'dh-virtualenv.tex', u'dh-virtualenv Documentation',
221 u'Spotify AB', 'manual'),
222 ]
223
224 # The name of an image file (relative to this directory) to place at the top of
225 # the title page.
226 #latex_logo = None
227
228 # For "manual" documents, if this is true, then toplevel headings are parts,
229 # not chapters.
230 #latex_use_parts = False
231
232 # If true, show page references after internal links.
233 #latex_show_pagerefs = False
234
235 # If true, show URL addresses after external links.
236 #latex_show_urls = False
237
238 # Documents to append as an appendix to all manuals.
239 #latex_appendices = []
240
241 # If false, no module index is generated.
242 #latex_domain_indices = True
243
244
245 # -- Options for manual page output --------------------------------------------
246
247 # One entry per manual page. List of tuples
248 # (source start file, name, description, authors, manual section).
249 man_pages = [
250 ('index', 'dh-virtualenv', u'dh-virtualenv Documentation',
251 [u'Spotify AB'], 1)
252 ]
253
254 # If true, show URL addresses after external links.
255 #man_show_urls = False
256
257
258 # -- Options for Texinfo output ------------------------------------------------
259
260 # Grouping the document tree into Texinfo files. List of tuples
261 # (source start file, target name, title, author,
262 # dir menu entry, description, category)
263 texinfo_documents = [
264 ('index', 'dh-virtualenv', u'dh-virtualenv Documentation',
265 u'Spotify AB', 'dh-virtualenv',
266 'Debian packaging sequence for Python virtualenvs.',
267 'Miscellaneous'),
268 ]
269
270 # Documents to append as an appendix to all manuals.
271 #texinfo_appendices = []
272
273 # If false, no module index is generated.
274 #texinfo_domain_indices = True
275
276 # How to display URL addresses: 'footnote', 'no', or 'inline'.
277 #texinfo_show_urls = 'footnote'