Mercurial > cpython-lru_cache-weakref
annotate Doc/conf.py @ 65035:87f4b32905df 2.7
Cosmetic fix to use print function.
| author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> |
|---|---|
| date | Fri, 01 Oct 2010 10:48:47 +0000 |
| parents | 82211b1850d4 |
| children | ff734f225b47 |
| 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 | 43 unused_docs = [ |
| 44 'maclib/scrap', | |
| 45 'library/xmllib', | |
| 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 |
|
54173
41a692627eeb
ignore .rst files in sphinx its self
Benjamin Peterson <benjamin@python.org>
parents:
49756
diff
changeset
|
49 # Ignore .rst in Sphinx its self. |
| 54177 | 50 exclude_trees = ['tools/sphinx'] |
|
54173
41a692627eeb
ignore .rst files in sphinx its self
Benjamin Peterson <benjamin@python.org>
parents:
49756
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 |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
66 # 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
|
67 # using the given strftime format. |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
68 html_last_updated_fmt = '%b %d, %Y' |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
69 |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
70 # 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
|
71 # typographically correct entities. |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
72 html_use_smartypants = True |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
73 |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
74 # 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
|
75 html_sidebars = { |
|
45721
66070fdbf0b9
Update for newest Sphinx.
Georg Brandl <georg@python.org>
parents:
45603
diff
changeset
|
76 'index': 'indexsidebar.html', |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
77 } |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
78 |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
79 # 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
|
80 html_additional_pages = { |
|
45721
66070fdbf0b9
Update for newest Sphinx.
Georg Brandl <georg@python.org>
parents:
45603
diff
changeset
|
81 'download': 'download.html', |
|
46494
ff58cb5aa76d
Update template for newest Sphinx.
Georg Brandl <georg@python.org>
parents:
46407
diff
changeset
|
82 'index': 'indexcontent.html', |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
83 } |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
84 |
|
46580
06aa802bfcb1
Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents:
46494
diff
changeset
|
85 # Output an OpenSearch description file. |
|
46647
9418dc4a7b98
Insert correct OpenSearch base URL.
Georg Brandl <georg@python.org>
parents:
46580
diff
changeset
|
86 html_use_opensearch = 'http://docs.python.org/dev' |
|
46580
06aa802bfcb1
Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents:
46494
diff
changeset
|
87 |
|
06aa802bfcb1
Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents:
46494
diff
changeset
|
88 # Additional static files. |
|
06aa802bfcb1
Add OpenSearch and a Python logo to the HTML output.
Georg Brandl <georg@python.org>
parents:
46494
diff
changeset
|
89 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
|
90 |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
91 # 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
|
92 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
|
93 |
| 47744 | 94 # Split the index |
| 95 html_split_index = True | |
| 96 | |
|
44323
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
97 |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
98 # Options for LaTeX output |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
99 # ------------------------ |
|
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
100 |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
101 # 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
|
102 latex_paper_size = 'a4' |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
103 |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
104 # 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
|
105 latex_font_size = '10pt' |
|
44323
e97f105d1c83
Adapt conf.py to new option names.
Georg Brandl <georg@python.org>
parents:
42603
diff
changeset
|
106 |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
107 # 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
|
108 # (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
|
109 _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
|
110 latex_documents = [ |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
111 ('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
|
112 'The Python/C API', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
113 ('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
|
114 'Distributing Python Modules', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
115 ('documenting/index', 'documenting.tex', |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
116 'Documenting Python', 'Georg Brandl', 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
117 ('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
|
118 'Extending and Embedding Python', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
119 ('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
|
120 'Installing Python Modules', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
121 ('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
|
122 'The Python Library Reference', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
123 ('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
|
124 'The Python Language Reference', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
125 ('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
|
126 'Python Tutorial', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
127 ('using/index', 'using.tex', |
|
64370
82211b1850d4
More descriptive title.
Raymond Hettinger <python@rcn.com>
parents:
55726
diff
changeset
|
128 'Python Setup', _stdauthor, 'manual'), |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
129 ('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
|
130 '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
|
131 ] |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
132 # Collect all HOWTOs individually |
|
45093
bdb70295248b
Update for latest sphinx latex writer.
Georg Brandl <georg@python.org>
parents:
45022
diff
changeset
|
133 latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex', |
|
49684
571938054721
Don't use "HOWTO" as the title for all howto .tex files.
Georg Brandl <georg@python.org>
parents:
49476
diff
changeset
|
134 '', _stdauthor, 'howto') |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
135 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
|
136 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
|
137 |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
138 # 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
|
139 latex_preamble = r''' |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
140 \authoraddress{ |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
141 \strong{Python Software Foundation}\\ |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
142 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
|
143 } |
|
49756
153fed7c7b60
Try to fix problems with verbatim.
Georg Brandl <georg@python.org>
parents:
49684
diff
changeset
|
144 \let\Verbatim=\OriginalVerbatim |
|
153fed7c7b60
Try to fix problems with verbatim.
Georg Brandl <georg@python.org>
parents:
49684
diff
changeset
|
145 \let\endVerbatim=\endOriginalVerbatim |
|
44710
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
146 ''' |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
147 |
|
27d59675b92c
Add Python-specific content to Doc dir. Update configuration file
Georg Brandl <georg@python.org>
parents:
44323
diff
changeset
|
148 # 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
|
149 latex_appendices = ['glossary', 'about', 'license', 'copyright'] |
|
45472
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
150 |
|
55726
db86d3cc1e6b
fix pdf building by teaching latex the right encoding package
Benjamin Peterson <benjamin@python.org>
parents:
54177
diff
changeset
|
151 # Get LaTeX to handle Unicode correctly |
|
db86d3cc1e6b
fix pdf building by teaching latex the right encoding package
Benjamin Peterson <benjamin@python.org>
parents:
54177
diff
changeset
|
152 latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'} |
|
db86d3cc1e6b
fix pdf building by teaching latex the right encoding package
Benjamin Peterson <benjamin@python.org>
parents:
54177
diff
changeset
|
153 |
|
45472
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
154 # Options for the coverage checker |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
155 # -------------------------------- |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
156 |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
157 # 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
|
158 # match any of the following regexes (using re.match). |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
159 coverage_ignore_modules = [ |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
160 r'[T|t][k|K]', |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
161 r'Tix', |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
162 r'distutils.*', |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
163 ] |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
164 |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
165 coverage_ignore_functions = [ |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
166 'test($|_)', |
|
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 |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
169 coverage_ignore_classes = [ |
|
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 # 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
|
173 coverage_c_path = [ |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
174 '../Include/*.h', |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
175 ] |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
176 |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
177 # Regexes to find C items in the source files. |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
178 coverage_c_regexes = { |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
179 'cfunction': (r'^PyAPI_FUNC\(.*\)\s+([^_][\w_]+)'), |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
180 'data': (r'^PyAPI_DATA\(.*\)\s+([^_][\w_]+)'), |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
181 'macro': (r'^#define ([^_][\w_]+)\(.*\)[\s|\\]'), |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
182 } |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
183 |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
184 # 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
|
185 # (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
|
186 coverage_ignore_c_items = { |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
187 # 'cfunction': [...] |
|
6ba5308f7ba4
Documentation coverage builder, part 1.
Georg Brandl <georg@python.org>
parents:
45261
diff
changeset
|
188 } |
