Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
cpython/Doc/conf.py at pythoncapi · pythoncapi/cpython · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
pythoncapi
/
cpython
Public
forked from
python/cpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
pythoncapi
Breadcrumbs
cpython
/
Doc
/
conf.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
209 lines (164 loc) · 6.28 KB
pythoncapi
Breadcrumbs
cpython
/
Doc
/
conf.py
Copy path
Top
File metadata and controls
Code
Blame
209 lines (164 loc) · 6.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#
# Python documentation build configuration file
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
import
sys
,
os
,
time
sys
.
path
.
append
(
os
.
path
.
abspath
(
'tools/extensions'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'includes'
))
# General configuration
# ---------------------
extensions
=
[
'sphinx.ext.coverage'
,
'sphinx.ext.doctest'
,
'pyspecific'
,
'c_annotations'
]
# General substitutions.
project
=
'Python'
copyright
=
'2001-%s, Python Software Foundation'
%
time
.
strftime
(
'%Y'
)
# We look for the Include/patchlevel.h file in the current Python source tree
# and replace the values accordingly.
import
patchlevel
version
,
release
=
patchlevel
.
get_version_info
()
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
today
=
''
# Else, today_fmt is used as the format for a strftime call.
today_fmt
=
'%B %d, %Y'
# By default, highlight as Python 3.
highlight_language
=
'python3'
# Require Sphinx 1.2 for build.
needs_sphinx
=
'1.2'
# Ignore any .rst files in the venv/ directory.
venvdir
=
os
.
getenv
(
'VENVDIR'
,
'venv'
)
exclude_patterns
=
[
venvdir
+
'/*'
,
'README.rst'
]
# Options for HTML output
# -----------------------
# Use our custom theme.
html_theme
=
'python_docs_theme'
html_theme_path
=
[
'tools'
]
html_theme_options
=
{
'collapsiblesidebar'
:
True
,
'issues_url'
:
'https://docs.python.org/3/bugs.html'
,
'root_include_title'
:
False
# We use the version switcher instead.
}
# Short title used e.g. for <title> HTML tags.
html_short_title
=
'%s Documentation'
%
release
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt
=
'%b %d, %Y'
# Path to find HTML templates.
templates_path
=
[
'tools/templates'
]
# Custom sidebar templates, filenames relative to this file.
html_sidebars
=
{
# Defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars
# Removes the quick search block
'**'
: [
'localtoc.html'
,
'relations.html'
,
'customsourcelink.html'
],
'index'
: [
'indexsidebar.html'
],
}
# Additional templates that should be rendered to pages.
html_additional_pages
=
{
'download'
:
'download.html'
,
'index'
:
'indexcontent.html'
,
}
# Output an OpenSearch description file.
html_use_opensearch
=
'https://docs.python.org/'
+
version
# Additional static files.
html_static_path
=
[
'tools/static'
]
# Output file base name for HTML help builder.
htmlhelp_basename
=
'python'
+
release
.
replace
(
'.'
,
''
)
# Split the index
html_split_index
=
True
# Options for LaTeX output
# ------------------------
latex_engine
=
'xelatex'
# Get LaTeX to handle Unicode correctly
latex_elements
=
{
}
# Additional stuff for the LaTeX preamble.
latex_elements
[
'preamble'
]
=
r'''
\authoraddress{
\sphinxstrong{Python Software Foundation}\\
Email: \sphinxemail{docs@python.org}
}
\let\Verbatim=\OriginalVerbatim
\let\endVerbatim=\endOriginalVerbatim
'''
# The paper size ('letter' or 'a4').
latex_elements
[
'papersize'
]
=
'a4'
# The font size ('10pt', '11pt' or '12pt').
latex_elements
[
'pointsize'
]
=
'10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
_stdauthor
=
r'Guido van Rossum\\and the Python development team'
latex_documents
=
[
(
'c-api/index'
,
'c-api.tex'
,
'The Python/C API'
,
_stdauthor
,
'manual'
),
(
'distributing/index'
,
'distributing.tex'
,
'Distributing Python Modules'
,
_stdauthor
,
'manual'
),
(
'extending/index'
,
'extending.tex'
,
'Extending and Embedding Python'
,
_stdauthor
,
'manual'
),
(
'installing/index'
,
'installing.tex'
,
'Installing Python Modules'
,
_stdauthor
,
'manual'
),
(
'library/index'
,
'library.tex'
,
'The Python Library Reference'
,
_stdauthor
,
'manual'
),
(
'reference/index'
,
'reference.tex'
,
'The Python Language Reference'
,
_stdauthor
,
'manual'
),
(
'tutorial/index'
,
'tutorial.tex'
,
'Python Tutorial'
,
_stdauthor
,
'manual'
),
(
'using/index'
,
'using.tex'
,
'Python Setup and Usage'
,
_stdauthor
,
'manual'
),
(
'faq/index'
,
'faq.tex'
,
'Python Frequently Asked Questions'
,
_stdauthor
,
'manual'
),
(
'whatsnew/'
+
version
,
'whatsnew.tex'
,
'What
\'
s New in Python'
,
'A. M. Kuchling'
,
'howto'
),
]
# Collect all HOWTOs individually
latex_documents
.
extend
((
'howto/'
+
fn
[:
-
4
],
'howto-'
+
fn
[:
-
4
]
+
'.tex'
,
''
,
_stdauthor
,
'howto'
)
for
fn
in
os
.
listdir
(
'howto'
)
if
fn
.
endswith
(
'.rst'
)
and
fn
!=
'index.rst'
)
# Documents to append as an appendix to all manuals.
latex_appendices
=
[
'glossary'
,
'about'
,
'license'
,
'copyright'
]
# Options for Epub output
# -----------------------
epub_author
=
'Python Documentation Authors'
epub_publisher
=
'Python Software Foundation'
# Options for the coverage checker
# --------------------------------
# The coverage checker will ignore all modules/functions/classes whose names
# match any of the following regexes (using re.match).
coverage_ignore_modules
=
[
r'[T|t][k|K]'
,
r'Tix'
,
r'distutils.*'
,
]
coverage_ignore_functions
=
[
'test($|_)'
,
]
coverage_ignore_classes
=
[
]
# Glob patterns for C source files for C API coverage, relative to this directory.
coverage_c_path
=
[
'../Include/*.h'
,
]
# Regexes to find C items in the source files.
coverage_c_regexes
=
{
'cfunction'
: (
r'^PyAPI_FUNC\(.*\)\s+([^_][\w_]+)'
),
'data'
: (
r'^PyAPI_DATA\(.*\)\s+([^_][\w_]+)'
),
'macro'
: (
r'^#define ([^_][\w_]+)\(.*\)[\s|\\]'
),
}
# The coverage checker will ignore all C items whose names match these regexes
# (using re.match) -- the keys must be the same as in coverage_c_regexes.
coverage_ignore_c_items
=
{
# 'cfunction': [...]
}
# Options for the link checker
# ----------------------------
# Ignore certain URLs.
linkcheck_ignore
=
[
r'https://bugs.python.org/(issue)?\d+'
,
# Ignore PEPs for now, they all have permanent redirects.
r'http://www.python.org/dev/peps/pep-\d+'
]
# Options for extensions
# ----------------------
# Relative filename of the reference count data file.
refcount_file
=
'data/refcounts.dat'
You can’t perform that action at this time.