source: python/vendor/Python-2.6.5/Doc/conf.py

Last change on this file was 2, checked in by Yuri Dario, 15 years ago

Initial import for vendor code.

  • Property svn:eol-style set to native
File size: 5.6 KB
Line 
1# -*- coding: utf-8 -*-
2#
3# Python documentation build configuration file
4#
5# This file is execfile()d with the current directory set to its containing dir.
6#
7# The contents of this file are pickled, so don't put values in the namespace
8# that aren't pickleable (module imports are okay, they're removed automatically).
9
10import sys, os, time
11sys.path.append(os.path.abspath('tools/sphinxext'))
12
13# General configuration
14# ---------------------
15
16extensions = ['sphinx.ext.refcounting', 'sphinx.ext.coverage',
17 'sphinx.ext.doctest', 'pyspecific']
18templates_path = ['tools/sphinxext']
19
20# General substitutions.
21project = 'Python'
22copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
23
24# The default replacements for |version| and |release|.
25#
26# The short X.Y version.
27# version = '2.6'
28# The full version, including alpha/beta/rc tags.
29# release = '2.6a0'
30
31# We look for the Include/patchlevel.h file in the current Python source tree
32# and replace the values accordingly.
33import patchlevel
34version, release = patchlevel.get_version_info()
35
36# There are two options for replacing |today|: either, you set today to some
37# non-false value, then it is used:
38today = ''
39# Else, today_fmt is used as the format for a strftime call.
40today_fmt = '%B %d, %Y'
41
42# List of files that shouldn't be included in the build.
43unused_docs = [
44 'maclib/scrap',
45 'library/xmllib',
46 'library/xml.etree',
47]
48
49# Ignore .rst in Sphinx its self.
50exclude_trees = ['tools/sphinx']
51
52# Relative filename of the reference count data file.
53refcount_file = 'data/refcounts.dat'
54
55# If true, '()' will be appended to :func: etc. cross-reference text.
56add_function_parentheses = True
57
58# If true, the current module name will be prepended to all description
59# unit titles (such as .. function::).
60add_module_names = True
61
62
63# Options for HTML output
64# -----------------------
65
66# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
67# using the given strftime format.
68html_last_updated_fmt = '%b %d, %Y'
69
70# If true, SmartyPants will be used to convert quotes and dashes to
71# typographically correct entities.
72html_use_smartypants = True
73
74# Custom sidebar templates, filenames relative to this file.
75html_sidebars = {
76 'index': 'indexsidebar.html',
77}
78
79# Additional templates that should be rendered to pages.
80html_additional_pages = {
81 'download': 'download.html',
82 'index': 'indexcontent.html',
83}
84
85# Output an OpenSearch description file.
86html_use_opensearch = 'http://docs.python.org/dev'
87
88# Additional static files.
89html_static_path = ['tools/sphinxext/static']
90
91# Output file base name for HTML help builder.
92htmlhelp_basename = 'python' + release.replace('.', '')
93
94# Split the index
95html_split_index = True
96
97
98# Options for LaTeX output
99# ------------------------
100
101# The paper size ('letter' or 'a4').
102latex_paper_size = 'a4'
103
104# The font size ('10pt', '11pt' or '12pt').
105latex_font_size = '10pt'
106
107# Grouping the document tree into LaTeX files. List of tuples
108# (source start file, target name, title, author, document class [howto/manual]).
109_stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor'
110latex_documents = [
111 ('c-api/index', 'c-api.tex',
112 'The Python/C API', _stdauthor, 'manual'),
113 ('distutils/index', 'distutils.tex',
114 'Distributing Python Modules', _stdauthor, 'manual'),
115 ('documenting/index', 'documenting.tex',
116 'Documenting Python', 'Georg Brandl', 'manual'),
117 ('extending/index', 'extending.tex',
118 'Extending and Embedding Python', _stdauthor, 'manual'),
119 ('install/index', 'install.tex',
120 'Installing Python Modules', _stdauthor, 'manual'),
121 ('library/index', 'library.tex',
122 'The Python Library Reference', _stdauthor, 'manual'),
123 ('reference/index', 'reference.tex',
124 'The Python Language Reference', _stdauthor, 'manual'),
125 ('tutorial/index', 'tutorial.tex',
126 'Python Tutorial', _stdauthor, 'manual'),
127 ('using/index', 'using.tex',
128 'Using Python', _stdauthor, 'manual'),
129 ('whatsnew/' + version, 'whatsnew.tex',
130 'What\'s New in Python', 'A. M. Kuchling', 'howto'),
131]
132# Collect all HOWTOs individually
133latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex',
134 '', _stdauthor, 'howto')
135 for fn in os.listdir('howto')
136 if fn.endswith('.rst') and fn != 'index.rst')
137
138# Additional stuff for the LaTeX preamble.
139latex_preamble = r'''
140\authoraddress{
141 \strong{Python Software Foundation}\\
142 Email: \email{docs@python.org}
143}
144\let\Verbatim=\OriginalVerbatim
145\let\endVerbatim=\endOriginalVerbatim
146'''
147
148# Documents to append as an appendix to all manuals.
149latex_appendices = ['glossary', 'about', 'license', 'copyright']
150
151# Get LaTeX to handle Unicode correctly
152latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'}
153
154# Options for the coverage checker
155# --------------------------------
156
157# The coverage checker will ignore all modules/functions/classes whose names
158# match any of the following regexes (using re.match).
159coverage_ignore_modules = [
160 r'[T|t][k|K]',
161 r'Tix',
162 r'distutils.*',
163]
164
165coverage_ignore_functions = [
166 'test($|_)',
167]
168
169coverage_ignore_classes = [
170]
171
172# Glob patterns for C source files for C API coverage, relative to this directory.
173coverage_c_path = [
174 '../Include/*.h',
175]
176
177# Regexes to find C items in the source files.
178coverage_c_regexes = {
179 'cfunction': (r'^PyAPI_FUNC\(.*\)\s+([^_][\w_]+)'),
180 'data': (r'^PyAPI_DATA\(.*\)\s+([^_][\w_]+)'),
181 'macro': (r'^#define ([^_][\w_]+)\(.*\)[\s|\\]'),
182}
183
184# The coverage checker will ignore all C items whose names match these regexes
185# (using re.match) -- the keys must be the same as in coverage_c_regexes.
186coverage_ignore_c_items = {
187# 'cfunction': [...]
188}
Note: See TracBrowser for help on using the repository browser.