|
1 |
| -# -*- coding: utf-8 -*- |
2 |
| -# |
3 |
| -# Python Developer's Guide documentation build configuration file, created by |
4 |
| -# sphinx-quickstart on Tue Jan 4 10:34:03 2011. |
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 sys |
16 | 1 | import time
|
17 | 2 |
|
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 |
| - |
23 |
| -sys.path.append(os.path.abspath('tools')) |
24 |
| - |
25 |
| -# -- General configuration ----------------------------------------------------- |
26 |
| - |
27 |
| -# If your documentation needs a minimal Sphinx version, state it here. |
28 |
| -#needs_sphinx = '1.0' |
29 |
| - |
30 |
| -# Add any Sphinx extension module names here, as strings. They can be extensions |
31 |
| -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
32 | 3 | extensions = [
|
33 | 4 | 'sphinx.ext.intersphinx',
|
34 | 5 | 'sphinx.ext.todo',
|
35 | 6 | 'sphinx_copybutton',
|
36 | 7 | 'sphinxext.rediraffe',
|
37 | 8 | ]
|
38 |
| -intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} |
39 |
| -todo_include_todos = True |
40 |
| - |
41 |
| -# The suffix of source filenames. |
42 |
| -source_suffix = '.rst' |
43 |
| - |
44 |
| -# The encoding of source files. |
45 |
| -#source_encoding = 'utf-8-sig' |
46 | 9 |
|
47 | 10 | # The master toctree document.
|
48 | 11 | master_doc = 'index'
|
49 | 12 |
|
50 | 13 | # General information about the project.
|
51 |
| -project = 'Python Developer\'s Guide' |
52 |
| -copyright = '2011-%s, Python Software Foundation' % time.strftime('%Y') |
53 |
| - |
54 |
| -# The version info for the project you're documenting, acts as replacement for |
55 |
| -# |version| and |release|, also used in various other places throughout the |
56 |
| -# built documents. |
57 |
| -# |
58 |
| -# The short X.Y version. |
59 |
| -version = '' |
60 |
| -# The full version, including alpha/beta/rc tags. |
61 |
| -release = '' |
62 |
| - |
63 |
| -# The language for content autogenerated by Sphinx. Refer to documentation |
64 |
| -# for a list of supported languages. |
65 |
| -#language = None |
66 |
| - |
67 |
| -# There are two options for replacing |today|: either, you set today to some |
68 |
| -# non-false value, then it is used: |
69 |
| -#today = '' |
70 |
| -# Else, today_fmt is used as the format for a strftime call. |
71 |
| -#today_fmt = '%B %d, %Y' |
| 14 | +project = "Python Developer's Guide" |
| 15 | +copyright = f'2011-{time.strftime("%Y")}, Python Software Foundation' |
72 | 16 |
|
73 | 17 | # List of patterns, relative to source directory, that match files and
|
74 | 18 | # directories to ignore when looking for source files.
|
75 |
| -exclude_patterns = ['_build', 'venv*', 'env*', 'README.rst', '.github'] |
76 |
| - |
77 |
| -# The reST default role (used for this markup: `text`) to use for all documents. |
78 |
| -#default_role = None |
79 |
| - |
80 |
| -# If true, '()' will be appended to :func: etc. cross-reference text. |
81 |
| -#add_function_parentheses = True |
82 |
| - |
83 |
| -# If true, the current module name will be prepended to all description |
84 |
| -# unit titles (such as .. function::). |
85 |
| -#add_module_names = True |
86 |
| - |
87 |
| -# If true, sectionauthor and moduleauthor directives will be shown in the |
88 |
| -# output. They are ignored by default. |
89 |
| -#show_authors = False |
90 |
| - |
91 |
| -# The name of the Pygments (syntax highlighting) style to use. |
92 |
| -pygments_style = 'sphinx' |
93 |
| - |
94 |
| -# A list of ignored prefixes for module index sorting. |
95 |
| -#modindex_common_prefix = [] |
96 |
| - |
97 |
| - |
98 |
| -# -- Options for HTML output --------------------------------------------------- |
| 19 | +exclude_patterns = [ |
| 20 | + '_build', |
| 21 | + 'venv*', |
| 22 | + 'env*', |
| 23 | + 'README.rst', |
| 24 | + '.github', |
| 25 | +] |
99 | 26 |
|
100 |
| -# Use the upstream python-docs-theme |
101 | 27 | html_theme = 'furo'
|
102 | 28 | html_theme_options = {}
|
103 |
| - |
104 |
| - |
105 |
| -# The name for this set of Sphinx documents. If None, it defaults to |
106 |
| -# "<project> v<release> documentation". |
107 |
| -html_title = "%s %s" % (project, release) |
108 |
| - |
109 |
| -# Path to find HTML templates. |
110 |
| -templates_path = ['tools/templates'] |
111 |
| - |
112 |
| -# Additional static files. |
113 |
| -html_static_path = ['tools/static'] |
114 |
| - |
115 |
| -# A shorter title for the navigation bar. Default is the same as html_title. |
116 |
| -#html_short_title = None |
117 |
| - |
118 |
| -# The name of an image file (relative to this directory) to place at the top |
119 |
| -# of the sidebar. |
120 |
| -html_logo = "python-logo.png" |
121 |
| - |
122 |
| -# The name of an image file (within the static path) to use as favicon of the |
123 |
| -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
124 |
| -# pixels large. |
125 |
| -#html_favicon = None |
126 |
| - |
127 |
| -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
128 |
| -# using the given strftime format. |
129 |
| -html_last_updated_fmt = '%b %d, %Y' |
130 |
| - |
131 |
| -# If true, SmartyPants will be used to convert quotes and dashes to |
132 |
| -# typographically correct entities. |
133 |
| -#html_use_smartypants = True |
134 |
| - |
135 |
| -# Additional templates that should be rendered to pages, maps page names to |
136 |
| -# template names. |
137 |
| -#html_additional_pages = {} |
138 |
| - |
139 |
| -# If false, no module index is generated. |
140 |
| -#html_domain_indices = True |
141 |
| - |
142 |
| -# If false, no index is generated. |
143 |
| -#html_use_index = True |
144 |
| - |
145 |
| -# If true, the index is split into individual pages for each letter. |
146 |
| -#html_split_index = False |
147 |
| - |
148 |
| -# If true, links to the reST sources are added to the pages. |
149 |
| -#html_show_sourcelink = True |
150 |
| - |
151 |
| -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
152 |
| -#html_show_sphinx = True |
153 |
| - |
154 |
| -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
155 |
| -#html_show_copyright = True |
156 |
| - |
157 |
| -# If true, an OpenSearch description file will be output, and all pages will |
158 |
| -# contain a <link> tag referring to it. The value of this option must be the |
159 |
| -# base URL from which the finished HTML is served. |
160 |
| -#html_use_opensearch = '' |
161 |
| - |
162 |
| -# This is the file name suffix for HTML files (e.g. ".xhtml"). |
163 |
| -#html_file_suffix = None |
164 |
| - |
165 |
| -# Output file base name for HTML help builder. |
166 |
| -htmlhelp_basename = 'PythonDevelopersGuidedoc' |
167 |
| - |
168 |
| - |
169 |
| -# -- Options for LaTeX output -------------------------------------------------- |
170 |
| - |
171 |
| -# The paper size ('letter' or 'a4'). |
172 |
| -#latex_paper_size = 'letter' |
173 |
| - |
174 |
| -# The font size ('10pt', '11pt' or '12pt'). |
175 |
| -#latex_font_size = '10pt' |
176 |
| - |
177 |
| -# Grouping the document tree into LaTeX files. List of tuples |
178 |
| -# (source start file, target name, title, author, documentclass [howto/manual]). |
179 |
| -latex_documents = [ |
180 |
| - ( |
181 |
| - 'index', |
182 |
| - 'PythonDevelopersGuide.tex', |
183 |
| - 'Python Developer\'s Guide Documentation', |
184 |
| - 'Brett Cannon', |
185 |
| - 'manual', |
186 |
| - ), |
| 29 | +html_static_path = ['_static'] |
| 30 | +html_css_files = [ |
| 31 | + 'devguide_overrides.css', |
187 | 32 | ]
|
| 33 | +html_logo = "_static/python-logo.svg" |
188 | 34 |
|
189 |
| -# The name of an image file (relative to this directory) to place at the top of |
190 |
| -# the title page. |
191 |
| -#latex_logo = None |
192 |
| - |
193 |
| -# For "manual" documents, if this is true, then toplevel headings are parts, |
194 |
| -# not chapters. |
195 |
| -#latex_use_parts = False |
196 |
| - |
197 |
| -# If true, show page references after internal links. |
198 |
| -#latex_show_pagerefs = False |
199 |
| - |
200 |
| -# If true, show URL addresses after external links. |
201 |
| -#latex_show_urls = False |
202 |
| - |
203 |
| -# Additional stuff for the LaTeX preamble. |
204 |
| -#latex_preamble = '' |
205 |
| - |
206 |
| -# Documents to append as an appendix to all manuals. |
207 |
| -#latex_appendices = [] |
208 |
| - |
209 |
| -# If false, no module index is generated. |
210 |
| -#latex_domain_indices = True |
211 |
| - |
212 |
| - |
213 |
| -# -- Options for manual page output -------------------------------------------- |
214 |
| - |
215 |
| -# One entry per manual page. List of tuples |
216 |
| -# (source start file, name, description, authors, manual section). |
217 |
| -man_pages = [ |
218 |
| - ( |
219 |
| - 'index', |
220 |
| - 'pythondevelopersguide', |
221 |
| - "Python Developer's Guide Documentation", |
222 |
| - ['Brett Cannon'], |
223 |
| - 1, |
224 |
| - ), |
225 |
| -] |
| 35 | +# Set to '' to prevent appending "documentation" to the site title |
| 36 | +html_title = "" |
226 | 37 |
|
227 | 38 | # ignore linkcheck anchors for /#/$ANCHOR since it is used for
|
228 | 39 | # dynamic pages such as http://buildbot.python.org/all/#/console
|
|
281 | 92 | 'https://discuss.python.org/groups/admins',
|
282 | 93 | ]
|
283 | 94 |
|
| 95 | +intersphinx_mapping = { |
| 96 | + 'python': ('https://docs.python.org/3', None), |
| 97 | +} |
284 | 98 |
|
285 |
| - |
286 |
| -# Use our custom CSS stylesheet to differentiate us from the official python |
287 |
| -# docs. |
288 |
| -def setup(app): |
289 |
| - app.add_css_file('custom.css') |
| 99 | +todo_include_todos = True |
0 commit comments