mirror of
https://github.com/python/cpython.git
synced 2024-11-25 19:03:49 +08:00
f65e25b626
svn+ssh://svn.python.org/python/branches/py3k ........ r86134 | georg.brandl | 2010-11-03 08:41:00 +0100 (Mi, 03 Nov 2010) | 1 line A newline in lineno output breaks pyframe output. ........ r86315 | georg.brandl | 2010-11-08 12:05:18 +0100 (Mo, 08 Nov 2010) | 1 line Fix latex conversion glitch in property/feature descriptions. ........ r86316 | georg.brandl | 2010-11-08 12:08:35 +0100 (Mo, 08 Nov 2010) | 1 line Fix typo. ........ r86390 | georg.brandl | 2010-11-10 08:57:10 +0100 (Mi, 10 Nov 2010) | 1 line Fix typo. ........ r86424 | georg.brandl | 2010-11-12 07:19:48 +0100 (Fr, 12 Nov 2010) | 1 line Build a PDF of the FAQs too. ........ r86425 | georg.brandl | 2010-11-12 07:20:12 +0100 (Fr, 12 Nov 2010) | 1 line #10008: Fix duplicate index entry. ........ r86428 | georg.brandl | 2010-11-12 09:09:26 +0100 (Fr, 12 Nov 2010) | 1 line Fix weird line block in table. ........ r86550 | georg.brandl | 2010-11-20 11:24:34 +0100 (Sa, 20 Nov 2010) | 1 line Fix rst markup errors. ........ r86561 | georg.brandl | 2010-11-20 12:47:10 +0100 (Sa, 20 Nov 2010) | 1 line #10460: Update indent.pro to match PEP 7 better. ........ r86562 | georg.brandl | 2010-11-20 14:44:41 +0100 (Sa, 20 Nov 2010) | 1 line #10439: document PyCodec C APIs. ........ r86564 | georg.brandl | 2010-11-20 15:08:53 +0100 (Sa, 20 Nov 2010) | 1 line #10460: an even better indent.pro. ........ r86565 | georg.brandl | 2010-11-20 15:16:17 +0100 (Sa, 20 Nov 2010) | 1 line socket.gethostbyname(socket.gethostname()) can fail when host name resolution is not set up correctly; do not fail test_socket if this is the case. ........ r86705 | georg.brandl | 2010-11-23 08:54:19 +0100 (Di, 23 Nov 2010) | 1 line #10468: document Unicode exception creation and access functions. ........ r86708 | georg.brandl | 2010-11-23 09:37:54 +0100 (Di, 23 Nov 2010) | 2 lines #10511: clarification of what heaps are; suggested by Johannes Hoff. ........ r86713 | georg.brandl | 2010-11-23 19:14:57 +0100 (Di, 23 Nov 2010) | 1 line assert.h is also included. Thanks to Savio Sena. ........
196 lines
5.9 KiB
Python
196 lines
5.9 KiB
Python
#
|
|
# 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/sphinxext'))
|
|
|
|
# General configuration
|
|
# ---------------------
|
|
|
|
extensions = ['sphinx.ext.refcounting', 'sphinx.ext.coverage',
|
|
'sphinx.ext.doctest', 'pyspecific']
|
|
templates_path = ['tools/sphinxext']
|
|
|
|
# General substitutions.
|
|
project = 'Python'
|
|
copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
|
|
|
|
# The default replacements for |version| and |release|.
|
|
#
|
|
# The short X.Y version.
|
|
# version = '2.6'
|
|
# The full version, including alpha/beta/rc tags.
|
|
# release = '2.6a0'
|
|
|
|
# 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'
|
|
|
|
# List of files that shouldn't be included in the build.
|
|
unused_docs = [
|
|
'maclib/scrap',
|
|
'library/xmllib',
|
|
'library/xml.etree',
|
|
]
|
|
|
|
# Ignore .rst in Sphinx its self.
|
|
exclude_trees = ['tools/sphinx']
|
|
|
|
# Relative filename of the reference count data file.
|
|
refcount_file = 'data/refcounts.dat'
|
|
|
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
add_function_parentheses = True
|
|
|
|
# If true, the current module name will be prepended to all description
|
|
# unit titles (such as .. function::).
|
|
add_module_names = True
|
|
|
|
# By default, highlight as Python 3.
|
|
highlight_language = 'python3'
|
|
|
|
|
|
# Options for HTML output
|
|
# -----------------------
|
|
|
|
html_theme = 'default'
|
|
html_theme_options = {'collapsiblesidebar': True}
|
|
|
|
# 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'
|
|
|
|
# If true, SmartyPants will be used to convert quotes and dashes to
|
|
# typographically correct entities.
|
|
html_use_smartypants = True
|
|
|
|
# Custom sidebar templates, filenames relative to this file.
|
|
html_sidebars = {
|
|
'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 = 'http://docs.python.org/dev/py3k'
|
|
|
|
# Additional static files.
|
|
html_static_path = ['tools/sphinxext/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
|
|
# ------------------------
|
|
|
|
# The paper size ('letter' or 'a4').
|
|
latex_paper_size = 'a4'
|
|
|
|
# The font size ('10pt', '11pt' or '12pt').
|
|
latex_font_size = '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\\Fred L. Drake, Jr., editor'
|
|
latex_documents = [
|
|
('c-api/index', 'c-api.tex',
|
|
'The Python/C API', _stdauthor, 'manual'),
|
|
('distutils/index', 'distutils.tex',
|
|
'Distributing Python Modules', _stdauthor, 'manual'),
|
|
('documenting/index', 'documenting.tex',
|
|
'Documenting Python', 'Georg Brandl', 'manual'),
|
|
('extending/index', 'extending.tex',
|
|
'Extending and Embedding Python', _stdauthor, 'manual'),
|
|
('install/index', 'install.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')
|
|
|
|
# Additional stuff for the LaTeX preamble.
|
|
latex_preamble = r'''
|
|
\authoraddress{
|
|
\strong{Python Software Foundation}\\
|
|
Email: \email{docs@python.org}
|
|
}
|
|
\let\Verbatim=\OriginalVerbatim
|
|
\let\endVerbatim=\endOriginalVerbatim
|
|
'''
|
|
|
|
# Documents to append as an appendix to all manuals.
|
|
latex_appendices = ['glossary', 'about', 'license', 'copyright']
|
|
|
|
# Get LaTeX to handle Unicode correctly
|
|
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
|
|
|
|
# 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': [...]
|
|
}
|