annotate Doc/conf.py @ 80661:94de77bd0b4b 2.7

Issue #16194: document imp.load_dynamic problems when read several extension modules from the same binary object file.
author Andrew Svetlov <andrew.svetlov@gmail.com>
date Thu, 29 Nov 2012 19:51:28 +0200
parents 9858d56c57ac
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42603
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
2 #
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
3 # Python documentation build configuration file
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
4 #
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
5 # This file is execfile()d with the current directory set to its containing dir.
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
6 #
42603
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
7 # The contents of this file are pickled, so don't put values in the namespace
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
8 # that aren't pickleable (module imports are okay, they're removed automatically).
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
9
44858
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
10 import sys, os, time
46407
94782be8f1e7 Use absolute path in sys.path.
Georg Brandl <georg@python.org>
parents: 46372
diff changeset
11 sys.path.append(os.path.abspath('tools/sphinxext'))
44858
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
12
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
13 # General configuration
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
14 # ---------------------
42603
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
15
46001
a99ca1e575ed Activate the Sphinx doctest extension and convert howto/functional to use it.
Georg Brandl <georg@python.org>
parents: 45721
diff changeset
16 extensions = ['sphinx.ext.refcounting', 'sphinx.ext.coverage',
46372
2c4553f65924 Add :issue: directive for easy linking to bugs.python.org.
Georg Brandl <georg@python.org>
parents: 46001
diff changeset
17 'sphinx.ext.doctest', 'pyspecific']
45721
66070fdbf0b9 Update for newest Sphinx.
Georg Brandl <georg@python.org>
parents: 45603
diff changeset
18 templates_path = ['tools/sphinxext']
45022
695e5bf3af9c Add refcounting extension to build config.
Georg Brandl <georg@python.org>
parents: 44858
diff changeset
19
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
20 # General substitutions.
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
21 project = 'Python'
44858
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
22 copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
23
42603
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
24 # The default replacements for |version| and |release|.
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
25 #
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
26 # The short X.Y version.
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
27 # version = '2.6'
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
28 # The full version, including alpha/beta/rc tags.
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
29 # release = '2.6a0'
44858
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
30
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
31 # We look for the Include/patchlevel.h file in the current Python source tree
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
32 # and replace the values accordingly.
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
33 import patchlevel
b76c78cda3ab Adapt to latest doctools refactoring.
Georg Brandl <georg@python.org>
parents: 44710
diff changeset
34 version, release = patchlevel.get_version_info()
42603
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
35
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
36 # There are two options for replacing |today|: either, you set today to some
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
37 # non-false value, then it is used:
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
38 today = ''
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
39 # Else, today_fmt is used as the format for a strftime call.
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
40 today_fmt = '%B %d, %Y'
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
41
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
42 # List of files that shouldn't be included in the build.
45261
745280d71425 Fix for newest doctools.
Georg Brandl <georg@python.org>
parents: 45093
diff changeset
43 unused_docs = [
745280d71425 Fix for newest doctools.
Georg Brandl <georg@python.org>
parents: 45093
diff changeset
44 'maclib/scrap',
745280d71425 Fix for newest doctools.
Georg Brandl <georg@python.org>
parents: 45093
diff changeset
45 'library/xmllib',
745280d71425 Fix for newest doctools.
Georg Brandl <georg@python.org>
parents: 45093
diff changeset
46 'library/xml.etree',
42603
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
47 ]
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
48
56812
a1b0936b027c Merged revisions 72558,72745,72750,72876,73042,73045-73048,73069,73089,73163,73186,73213,73215,73217,73257-73258,73260 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50000
diff changeset
49 # Ignore .rst in Sphinx its self.
a1b0936b027c Merged revisions 72558,72745,72750,72876,73042,73045-73048,73069,73089,73163,73186,73213,73215,73217,73257-73258,73260 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50000
diff changeset
50 exclude_trees = ['tools/sphinx']
a1b0936b027c Merged revisions 72558,72745,72750,72876,73042,73045-73048,73069,73089,73163,73186,73213,73215,73217,73257-73258,73260 via svnmerge from
Georg Brandl <georg@python.org>
parents: 50000
diff changeset
51
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
52 # Relative filename of the reference count data file.
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
53 refcount_file = 'data/refcounts.dat'
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
54
42603
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
55 # If true, '()' will be appended to :func: etc. cross-reference text.
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
56 add_function_parentheses = True
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
57
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
58 # If true, the current module name will be prepended to all description
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
59 # unit titles (such as .. function::).
c62f6669ae22 Move the 2.6 reST doc tree in place.
Georg Brandl <georg@python.org>
parents:
diff changeset
60 add_module_names = True
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
61
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
62
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
63 # Options for HTML output
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
64 # -----------------------
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
65
74552
9858d56c57ac Fix conf.py for Sphinx 1.0.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
66 html_theme = 'default'
9858d56c57ac Fix conf.py for Sphinx 1.0.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
67 html_theme_options = {'collapsiblesidebar': True}
9858d56c57ac Fix conf.py for Sphinx 1.0.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
68
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
69 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
70 # using the given strftime format.
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
71 html_last_updated_fmt = '%b %d, %Y'
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
72
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
73 # If true, SmartyPants will be used to convert quotes and dashes to
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
74 # typographically correct entities.
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
75 html_use_smartypants = True
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
76
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
77 # Custom sidebar templates, filenames relative to this file.
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
78 html_sidebars = {
45721
66070fdbf0b9 Update for newest Sphinx.
Georg Brandl <georg@python.org>
parents: 45603
diff changeset
79 'index': 'indexsidebar.html',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
80 }
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
81
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
82 # Additional templates that should be rendered to pages.
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
83 html_additional_pages = {
45721
66070fdbf0b9 Update for newest Sphinx.
Georg Brandl <georg@python.org>
parents: 45603
diff changeset
84 'download': 'download.html',
46494
ff58cb5aa76d Update template for newest Sphinx.
Georg Brandl <georg@python.org>
parents: 46407
diff changeset
85 'index': 'indexcontent.html',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
86 }
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
87
46580
06aa802bfcb1 Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents: 46494
diff changeset
88 # Output an OpenSearch description file.
74552
9858d56c57ac Fix conf.py for Sphinx 1.0.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
89 html_use_opensearch = 'http://docs.python.org/'
46580
06aa802bfcb1 Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents: 46494
diff changeset
90
06aa802bfcb1 Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents: 46494
diff changeset
91 # Additional static files.
06aa802bfcb1 Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents: 46494
diff changeset
92 html_static_path = ['tools/sphinxext/static']
06aa802bfcb1 Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents: 46494
diff changeset
93
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
94 # Output file base name for HTML help builder.
45603
a62f95a4adfc New default basename for HTML help files.
Georg Brandl <georg@python.org>
parents: 45521
diff changeset
95 htmlhelp_basename = 'python' + release.replace('.', '')
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
96
47744
98d012a8e445 Split the HTML index.
Georg Brandl <georg@python.org>
parents: 46647
diff changeset
97 # Split the index
98d012a8e445 Split the HTML index.
Georg Brandl <georg@python.org>
parents: 46647
diff changeset
98 html_split_index = True
98d012a8e445 Split the HTML index.
Georg Brandl <georg@python.org>
parents: 46647
diff changeset
99
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
100
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
101 # Options for LaTeX output
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
102 # ------------------------
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
103
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
104 # The paper size ('letter' or 'a4').
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
105 latex_paper_size = 'a4'
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
106
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
107 # The font size ('10pt', '11pt' or '12pt').
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
108 latex_font_size = '10pt'
44323
e97f105d1c83 Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents: 42603
diff changeset
109
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
110 # Grouping the document tree into LaTeX files. List of tuples
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
111 # (source start file, target name, title, author, document class [howto/manual]).
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
112 _stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor'
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
113 latex_documents = [
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
114 ('c-api/index', 'c-api.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
115 'The Python/C API', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
116 ('distutils/index', 'distutils.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
117 'Distributing Python Modules', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
118 ('extending/index', 'extending.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
119 'Extending and Embedding Python', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
120 ('install/index', 'install.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
121 'Installing Python Modules', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
122 ('library/index', 'library.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
123 'The Python Library Reference', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
124 ('reference/index', 'reference.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
125 'The Python Language Reference', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
126 ('tutorial/index', 'tutorial.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
127 'Python Tutorial', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
128 ('using/index', 'using.tex',
65127
ff734f225b47 Merged revisions 82798,82805,83659,83977,84015,84018,84141,84264,84326-84327,84480,84482,84484,84530-84531,84553,84619,84915-84916 via svnmerge from
Georg Brandl <georg@python.org>
parents: 64370
diff changeset
129 'Python Setup and Usage', _stdauthor, 'manual'),
66465
2e58126dbad0 Merged revisions 85843,85849-85850,85867,85907,85914,86134,86187,86315-86316,86390,86424-86425,86428 via svnmerge from
Georg Brandl <georg@python.org>
parents: 65127
diff changeset
130 ('faq/index', 'faq.tex',
2e58126dbad0 Merged revisions 85843,85849-85850,85867,85907,85914,86134,86187,86315-86316,86390,86424-86425,86428 via svnmerge from
Georg Brandl <georg@python.org>
parents: 65127
diff changeset
131 'Python Frequently Asked Questions', _stdauthor, 'manual'),
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
132 ('whatsnew/' + version, 'whatsnew.tex',
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
133 'What\'s New in Python', 'A. M. Kuchling', 'howto'),
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
134 ]
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
135 # Collect all HOWTOs individually
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
136 latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex',
50000
89bc31e06489 Merged revisions 67154,67157-67159,67162-67163,67166,67175-67176,67189,67224-67225,67243 via svnmerge from
Georg Brandl <georg@python.org>
parents: 49870
diff changeset
137 '', _stdauthor, 'howto')
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
138 for fn in os.listdir('howto')
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
139 if fn.endswith('.rst') and fn != 'index.rst')
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
140
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
141 # Additional stuff for the LaTeX preamble.
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
142 latex_preamble = r'''
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
143 \authoraddress{
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
144 \strong{Python Software Foundation}\\
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
145 Email: \email{docs@python.org}
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
146 }
49760
7238950d5c60 Merged revisions 67278 via svnmerge from
Georg Brandl <georg@python.org>
parents: 49477
diff changeset
147 \let\Verbatim=\OriginalVerbatim
7238950d5c60 Merged revisions 67278 via svnmerge from
Georg Brandl <georg@python.org>
parents: 49477
diff changeset
148 \let\endVerbatim=\endOriginalVerbatim
44710
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
149 '''
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
150
27d59675b92c Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents: 44323
diff changeset
151 # Documents to append as an appendix to all manuals.
45093
bdb70295248b Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents: 45022
diff changeset
152 latex_appendices = ['glossary', 'about', 'license', 'copyright']
45472
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
153
56820
85aa706f7126 Merged revisions 74492,74531,74545-74550,74553-74555,74588,74603,74608,74614,74616-74618,74631-74633,74652-74653,74666,74671,74737,74739,74779,74781-74782,74784,74791,74793,74818-74820,74822,74832 via svnmerge from
Georg Brandl <georg@python.org>
parents: 56812
diff changeset
154 # Get LaTeX to handle Unicode correctly
74552
9858d56c57ac Fix conf.py for Sphinx 1.0.
Georg Brandl <georg@python.org>
parents: 68256
diff changeset
155 latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
49870
b58a435002c1 Try using utf8x input encoding.
Georg Brandl <georg@python.org>
parents: 49760
diff changeset
156
45472
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
157 # Options for the coverage checker
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
158 # --------------------------------
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
159
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
160 # The coverage checker will ignore all modules/functions/classes whose names
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
161 # match any of the following regexes (using re.match).
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
162 coverage_ignore_modules = [
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
163 r'[T|t][k|K]',
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
164 r'Tix',
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
165 r'distutils.*',
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
166 ]
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
167
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
168 coverage_ignore_functions = [
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
169 'test($|_)',
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
170 ]
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
171
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
172 coverage_ignore_classes = [
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
173 ]
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
174
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
175 # Glob patterns for C source files for C API coverage, relative to this directory.
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
176 coverage_c_path = [
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
177 '../Include/*.h',
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
178 ]
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
179
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
180 # Regexes to find C items in the source files.
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
181 coverage_c_regexes = {
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
182 'cfunction': (r'^PyAPI_FUNC\(.*\)\s+([^_][\w_]+)'),
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
183 'data': (r'^PyAPI_DATA\(.*\)\s+([^_][\w_]+)'),
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
184 'macro': (r'^#define ([^_][\w_]+)\(.*\)[\s|\\]'),
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
185 }
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
186
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
187 # The coverage checker will ignore all C items whose names match these regexes
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
188 # (using re.match) -- the keys must be the same as in coverage_c_regexes.
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
189 coverage_ignore_c_items = {
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
190 # 'cfunction': [...]
6ba5308f7ba4 Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents: 45261
diff changeset
191 }