blob: 5be5d1e81f0378835cd5c779363c06f36ffff284 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001# -*- coding: utf-8 -*-
2#
3# Python documentation build configuration file
4#
Christian Heimes679db4a2008-01-18 09:56:22 +00005# This file is execfile()d with the current directory set to its containing dir.
6#
Georg Brandl116aa622007-08-15 14:28:22 +00007# 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).
Christian Heimes2c181612007-12-17 20:04:13 +00009
10# General configuration
11# ---------------------
Georg Brandl116aa622007-08-15 14:28:22 +000012
Christian Heimes679db4a2008-01-18 09:56:22 +000013# General substitutions.
14project = 'Python'
15copyright = '1990-2007, Python Software Foundation'
16
Georg Brandl116aa622007-08-15 14:28:22 +000017# The default replacements for |version| and |release|.
Christian Heimes679db4a2008-01-18 09:56:22 +000018# If '<auto>', Sphinx looks for the Include/patchlevel.h file in the current Python
Georg Brandl116aa622007-08-15 14:28:22 +000019# source tree and replaces the values accordingly.
20#
21# The short X.Y version.
22# version = '2.6'
Christian Heimes679db4a2008-01-18 09:56:22 +000023version = '<auto>'
Georg Brandl116aa622007-08-15 14:28:22 +000024# The full version, including alpha/beta/rc tags.
25# release = '2.6a0'
Christian Heimes679db4a2008-01-18 09:56:22 +000026release = '<auto>'
Georg Brandl116aa622007-08-15 14:28:22 +000027
28# There are two options for replacing |today|: either, you set today to some
29# non-false value, then it is used:
30today = ''
31# Else, today_fmt is used as the format for a strftime call.
32today_fmt = '%B %d, %Y'
33
Georg Brandl116aa622007-08-15 14:28:22 +000034# List of files that shouldn't be included in the build.
35unused_files = [
36 'whatsnew/2.0.rst',
37 'whatsnew/2.1.rst',
38 'whatsnew/2.2.rst',
39 'whatsnew/2.3.rst',
40 'whatsnew/2.4.rst',
41 'whatsnew/2.5.rst',
42 'whatsnew/2.6.rst',
43 'maclib/scrap.rst',
44 'library/xmllib.rst',
45 'library/xml.etree.rst',
46]
47
Christian Heimes679db4a2008-01-18 09:56:22 +000048# Relative filename of the reference count data file.
49refcount_file = 'data/refcounts.dat'
50
Georg Brandl116aa622007-08-15 14:28:22 +000051# If true, '()' will be appended to :func: etc. cross-reference text.
52add_function_parentheses = True
53
54# If true, the current module name will be prepended to all description
55# unit titles (such as .. function::).
56add_module_names = True
Christian Heimes2c181612007-12-17 20:04:13 +000057
58
59# Options for HTML output
60# -----------------------
61
Christian Heimes2c181612007-12-17 20:04:13 +000062# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
63# using the given strftime format.
64html_last_updated_fmt = '%b %d, %Y'
65
66# If true, SmartyPants will be used to convert quotes and dashes to
67# typographically correct entities.
68html_use_smartypants = True
69
Christian Heimes679db4a2008-01-18 09:56:22 +000070# Content template for the index page, filename relative to this file.
71html_index = 'tools/sphinxext/indexcontent.html'
72
73# Custom sidebar templates, filenames relative to this file.
74html_sidebars = {
75 'index': 'tools/sphinxext/indexsidebar.html',
76}
77
78# Additional templates that should be rendered to pages.
79html_additional_pages = {
80 'download': 'tools/sphinxext/download.html',
81}
82
83# Output file base name for HTML help builder.
84htmlhelp_basename = 'pydoc'
85
Christian Heimes2c181612007-12-17 20:04:13 +000086
87# Options for LaTeX output
88# ------------------------
89
Christian Heimes679db4a2008-01-18 09:56:22 +000090# The paper size ('letter' or 'a4').
91latex_paper_size = 'a4'
Christian Heimes2c181612007-12-17 20:04:13 +000092
Christian Heimes679db4a2008-01-18 09:56:22 +000093# The font size ('10pt', '11pt' or '12pt').
94latex_font_size = '10pt'
95
96# Grouping the document tree into LaTeX files. List of tuples
97# (source start file, target name, title, author, document class [howto/manual]).
98_stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor'
99latex_documents = [
100 ('c-api/index.rst', 'c-api.tex',
101 'The Python/C API', _stdauthor, 'manual'),
102 ('distutils/index.rst', 'distutils.tex',
103 'Distributing Python Modules', _stdauthor, 'manual'),
104 ('documenting/index.rst', 'documenting.tex',
105 'Documenting Python', 'Georg Brandl', 'manual'),
106 ('extending/index.rst', 'extending.tex',
107 'Extending and Embedding Python', _stdauthor, 'manual'),
108 ('install/index.rst', 'install.tex',
109 'Installing Python Modules', _stdauthor, 'manual'),
110 ('library/index.rst', 'library.tex',
111 'The Python Library Reference', _stdauthor, 'manual'),
112 ('reference/index.rst', 'reference.tex',
113 'The Python Language Reference', _stdauthor, 'manual'),
114 ('tutorial/index.rst', 'tutorial.tex',
115 'Python Tutorial', _stdauthor, 'manual'),
116 ('using/index.rst', 'using.tex',
117 'Using Python', _stdauthor, 'manual'),
118 ('whatsnew/' + version + '.rst', 'whatsnew.tex',
119 'What\'s New in Python', 'A. M. Kuchling', 'howto'),
120]
121# Collect all HOWTOs individually
122import os
123latex_documents.extend(('howto/' + fn, 'howto-' + fn[:-4] + '.tex',
124 'HOWTO', _stdauthor, 'howto')
125 for fn in os.listdir('howto')
126 if fn.endswith('.rst') and fn != 'index.rst')
127
128# Additional stuff for the LaTeX preamble.
129latex_preamble = r'''
130\authoraddress{
131 \strong{Python Software Foundation}\\
132 Email: \email{docs@python.org}
133}
134'''
135
136# Documents to append as an appendix to all manuals.
137latex_appendices = ['glossary.rst', 'about.rst', 'license.rst', 'copyright.rst']