source: trunk/docs/conf.py @ 918

Last change on this file since 918 was 918, checked in by darcy, 2 years ago

Update copyrights.

  • Property svn:keywords set to Author Date Id Revision
File size: 10.1 KB
Line 
1# -*- coding: utf-8 -*-
2#
3# PyGreSQL documentation build configuration file.
4#
5# This file is execfile()d with the current directory set to its
6# 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
14import sys
15import os
16import shlex
17import shutil
18
19# Import Cloud theme (this will also automatically add the theme directory).
20# Note: We add a navigation bar to the cloud them using a custom layout.
21if os.environ.get('READTHEDOCS', None) == 'True':
22    # We cannot use our custom layout here, since RTD overrides layout.html.
23    use_cloud_theme = False
24else:
25    try:
26        import cloud_sptheme
27        use_cloud_theme = True
28    except ImportError:
29        use_cloud_theme = False
30
31shutil.copyfile('start.txt' if use_cloud_theme else 'toc.txt', 'index.rst')
32
33# If extensions (or modules to document with autodoc) are in another directory,
34# add these directories to sys.path here. If the directory is relative to the
35# documentation root, use os.path.abspath to make it absolute, like shown here.
36#sys.path.insert(0, os.path.abspath('.'))
37
38# -- General configuration ------------------------------------------------
39
40# If your documentation needs a minimal Sphinx version, state it here.
41#needs_sphinx = '1.0'
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.
45extensions = ['sphinx.ext.autodoc']
46
47# Add any paths that contain templates here, relative to this directory.
48templates_path = ['_templates'] if use_cloud_theme else []
49
50# The suffix(es) of source filenames.
51# You can specify multiple suffix as a list of string:
52# source_suffix = ['.rst', '.md']
53source_suffix = '.rst'
54
55# The encoding of source files.
56#source_encoding = 'utf-8-sig'
57
58# The master toctree document.
59master_doc = 'index'
60
61# General information about the project.
62project = 'PyGreSQL'
63author = 'The PyGreSQL team'
64copyright = '2017, ' + author
65
66# The version info for the project you're documenting, acts as replacement for
67# |version| and |release|, also used in various other places throughout the
68# built documents.
69#
70# The short X.Y version.
71version = '5.0'
72# The full version, including alpha/beta/rc tags.
73release = '5.0.4'
74
75# The language for content autogenerated by Sphinx. Refer to documentation
76# for a list of supported languages.
77# This is also used if you do content translation via gettext catalogs.
78# Usually you set "language" from the command line for these cases.
79language = None
80
81# There are two options for replacing |today|: either, you set today to some
82# non-false value, then it is used:
83#today = ''
84# Else, today_fmt is used as the format for a strftime call.
85#today_fmt = '%B %d, %Y'
86
87# List of patterns, relative to source directory, that match files and
88# directories to ignore when looking for source files.
89exclude_patterns = ['_build']
90
91# List of pages which are included in other pages and therefore should
92# not appear in the toctree.
93exclude_patterns += [
94    'download/download.rst', 'download/files.rst',
95    'community/mailinglist.rst', 'community/source.rst',
96    'community/bugtracker.rst', 'community/support.rst',
97    'community/homes.rst']
98if use_cloud_theme:
99    exclude_patterns += ['about.rst']
100
101# The reST default role (used for this markup: `text`) for all documents.
102#default_role = None
103
104# If true, '()' will be appended to :func: etc. cross-reference text.
105#add_function_parentheses = True
106
107# If true, the current module name will be prepended to all description
108# unit titles (such as .. function::).
109#add_module_names = True
110
111# If true, sectionauthor and moduleauthor directives will be shown in the
112# output. They are ignored by default.
113#show_authors = False
114
115# The name of the Pygments (syntax highlighting) style to use.
116pygments_style = 'sphinx'
117
118# A list of ignored prefixes for module index sorting.
119#modindex_common_prefix = []
120
121
122# If true, keep warnings as "system message" paragraphs in the built documents.
123#keep_warnings = False
124
125# If true, `todo` and `todoList` produce output, else they produce nothing.
126todo_include_todos = False
127
128
129# -- Options for HTML output ----------------------------------------------
130
131# The theme to use for HTML and HTML Help pages.  See the documentation for
132# a list of builtin themes.
133html_theme = 'cloud' if use_cloud_theme else 'default'
134
135# Theme options are theme-specific and customize the look and feel of a theme
136# further.  For a list of options available for each theme, see the
137# documentation.
138if use_cloud_theme:
139    html_theme_options = {
140        'roottarget': 'contents/index',
141        'defaultcollapsed': True,
142        'shaded_decor': True}
143else:
144    html_theme_options = {}
145
146# Add any paths that contain custom themes here, relative to this directory.
147html_theme_path = ['_themes']
148
149# The name for this set of Sphinx documents.  If None, it defaults to
150# "<project> v<release> documentation".
151html_title = 'PyGreSQL %s' % version
152if use_cloud_theme:
153    html_title += ' documentation'
154
155# A shorter title for the navigation bar.  Default is the same as html_title.
156#html_short_title = None
157
158# The name of an image file (relative to this directory) to place at the top
159# of the sidebar.
160html_logo = '_static/pygresql.png'
161
162# The name of an image file (within the static path) to use as favicon of the
163# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
164# pixels large.
165html_favicon = '_static/favicon.ico'
166
167# Add any paths that contain custom static files (such as style sheets) here,
168# relative to this directory. They are copied after the builtin static files,
169# so a file named "default.css" will overwrite the builtin "default.css".
170html_static_path = ['_static']
171
172# Add any extra paths that contain custom files (such as robots.txt or
173# .htaccess) here, relative to this directory. These files are copied
174# directly to the root of the documentation.
175#html_extra_path = []
176
177# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
178# using the given strftime format.
179#html_last_updated_fmt = '%b %d, %Y'
180
181# If true, SmartyPants will be used to convert quotes and dashes to
182# typographically correct entities.
183#html_use_smartypants = True
184
185# Custom sidebar templates, maps document names to template names.
186#html_sidebars = {}
187
188# Additional templates that should be rendered to pages, maps page names to
189# template names.
190#html_additional_pages = {}
191
192# If false, no module index is generated.
193#html_domain_indices = True
194
195# If false, no index is generated.
196#html_use_index = True
197
198# If true, the index is split into individual pages for each letter.
199#html_split_index = False
200
201# If true, links to the reST sources are added to the pages.
202#html_show_sourcelink = True
203
204# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
205#html_show_sphinx = True
206
207# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
208#html_show_copyright = True
209
210# If true, an OpenSearch description file will be output, and all pages will
211# contain a <link> tag referring to it.  The value of this option must be the
212# base URL from which the finished HTML is served.
213#html_use_opensearch = ''
214
215# This is the file name suffix for HTML files (e.g. ".xhtml").
216#html_file_suffix = None
217
218# Language to be used for generating the HTML full-text search index.
219# Sphinx supports the following languages:
220#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
221#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
222#html_search_language = 'en'
223
224# A dictionary with options for the search language support, empty by default.
225# Now only 'ja' uses this config value
226#html_search_options = {'type': 'default'}
227
228# The name of a javascript file (relative to the configuration directory) that
229# implements a search results scorer. If empty, the default will be used.
230#html_search_scorer = 'scorer.js'
231
232# Output file base name for HTML help builder.
233htmlhelp_basename = 'PyGreSQLdoc'
234
235
236# -- Options for LaTeX output ---------------------------------------------
237
238latex_elements = {
239# The paper size ('letterpaper' or 'a4paper').
240#'papersize': 'letterpaper',
241
242# The font size ('10pt', '11pt' or '12pt').
243#'pointsize': '10pt',
244
245# Additional stuff for the LaTeX preamble.
246#'preamble': '',
247
248# Latex figure (float) alignment
249#'figure_align': 'htbp',
250}
251
252# Grouping the document tree into LaTeX files. List of tuples
253# (source start file, target name, title,
254#  author, documentclass [howto, manual, or own class]).
255latex_documents = [
256    (master_doc, 'PyGreSQL.tex', 'PyGreSQL Documentation',
257     author, 'manual'),
258]
259
260# The name of an image file (relative to this directory) to place at the top of
261# the title page.
262#latex_logo = None
263
264# For "manual" documents, if this is true, then toplevel headings are parts,
265# not chapters.
266#latex_use_parts = False
267
268# If true, show page references after internal links.
269#latex_show_pagerefs = False
270
271# If true, show URL addresses after external links.
272#latex_show_urls = False
273
274# Documents to append as an appendix to all manuals.
275#latex_appendices = []
276
277# If false, no module index is generated.
278#latex_domain_indices = True
279
280
281# -- Options for manual page output ---------------------------------------
282
283# One entry per manual page. List of tuples
284# (source start file, name, description, authors, manual section).
285man_pages = [
286    (master_doc, 'pygresql', 'PyGreSQL Documentation', [author], 1)
287]
288
289# If true, show URL addresses after external links.
290#man_show_urls = False
291
292
293# -- Options for Texinfo output -------------------------------------------
294
295# Grouping the document tree into Texinfo files. List of tuples
296# (source start file, target name, title, author,
297#  dir menu entry, description, category)
298texinfo_documents = [
299    (master_doc, 'PyGreSQL', u'PyGreSQL Documentation',
300     author, 'PyGreSQL', 'One line description of project.',
301     'Miscellaneous'),
302]
303
304# Documents to append as an appendix to all manuals.
305#texinfo_appendices = []
306
307# If false, no module index is generated.
308#texinfo_domain_indices = True
309
310# How to display URL addresses: 'footnote', 'no', or 'inline'.
311#texinfo_show_urls = 'footnote'
312
313# If true, do not generate a @detailmenu in the "Top" node's menu.
314#texinfo_no_detailmenu = False
Note: See TracBrowser for help on using the repository browser.