blob: 835967485188c65cbe2a724c624f2bf54d5ec7ba [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
Georg Brandl86def6c2008-01-21 20:36:10 +000010import sys, os, time
11sys.path.append('tools/sphinxext')
12
Christian Heimes2c181612007-12-17 20:04:13 +000013# General configuration
14# ---------------------
Georg Brandl116aa622007-08-15 14:28:22 +000015
Christian Heimes679db4a2008-01-18 09:56:22 +000016# General substitutions.
17project = 'Python'
Georg Brandl86def6c2008-01-21 20:36:10 +000018copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
Christian Heimes679db4a2008-01-18 09:56:22 +000019
Georg Brandl116aa622007-08-15 14:28:22 +000020# The default replacements for |version| and |release|.
Georg Brandl116aa622007-08-15 14:28:22 +000021#
22# The short X.Y version.
23# version = '2.6'
Georg Brandl116aa622007-08-15 14:28:22 +000024# The full version, including alpha/beta/rc tags.
25# release = '2.6a0'
Georg Brandl86def6c2008-01-21 20:36:10 +000026
27# We look for the Include/patchlevel.h file in the current Python source tree
28# and replace the values accordingly.
29import patchlevel
30version, release = patchlevel.get_version_info()
Georg Brandl116aa622007-08-15 14:28:22 +000031
32# There are two options for replacing |today|: either, you set today to some
33# non-false value, then it is used:
34today = ''
35# Else, today_fmt is used as the format for a strftime call.
36today_fmt = '%B %d, %Y'
37
Georg Brandl116aa622007-08-15 14:28:22 +000038# List of files that shouldn't be included in the build.
39unused_files = [
40 'whatsnew/2.0.rst',
41 'whatsnew/2.1.rst',
42 'whatsnew/2.2.rst',
43 'whatsnew/2.3.rst',
44 'whatsnew/2.4.rst',
45 'whatsnew/2.5.rst',
46 'whatsnew/2.6.rst',
47 'maclib/scrap.rst',
48 'library/xmllib.rst',
49 'library/xml.etree.rst',
50]
51
Christian Heimes679db4a2008-01-18 09:56:22 +000052# Relative filename of the reference count data file.
53refcount_file = 'data/refcounts.dat'
54
Georg Brandl116aa622007-08-15 14:28:22 +000055# 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
Christian Heimes2c181612007-12-17 20:04:13 +000061
62
63# Options for HTML output
64# -----------------------
65
Christian Heimes2c181612007-12-17 20:04:13 +000066# 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
Christian Heimes679db4a2008-01-18 09:56:22 +000074# Content template for the index page, filename relative to this file.
75html_index = 'tools/sphinxext/indexcontent.html'
76
77# Custom sidebar templates, filenames relative to this file.
78html_sidebars = {
79 'index': 'tools/sphinxext/indexsidebar.html',
80}
81
82# Additional templates that should be rendered to pages.
83html_additional_pages = {
84 'download': 'tools/sphinxext/download.html',
85}
86
87# Output file base name for HTML help builder.
88htmlhelp_basename = 'pydoc'
89
Christian Heimes2c181612007-12-17 20:04:13 +000090
91# Options for LaTeX output
92# ------------------------
93
Christian Heimes679db4a2008-01-18 09:56:22 +000094# The paper size ('letter' or 'a4').
95latex_paper_size = 'a4'
Christian Heimes2c181612007-12-17 20:04:13 +000096
Christian Heimes679db4a2008-01-18 09:56:22 +000097# The font size ('10pt', '11pt' or '12pt').
98latex_font_size = '10pt'
99
100# Grouping the document tree into LaTeX files. List of tuples
101# (source start file, target name, title, author, document class [howto/manual]).
102_stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor'
103latex_documents = [
104 ('c-api/index.rst', 'c-api.tex',
105 'The Python/C API', _stdauthor, 'manual'),
106 ('distutils/index.rst', 'distutils.tex',
107 'Distributing Python Modules', _stdauthor, 'manual'),
108 ('documenting/index.rst', 'documenting.tex',
109 'Documenting Python', 'Georg Brandl', 'manual'),
110 ('extending/index.rst', 'extending.tex',
111 'Extending and Embedding Python', _stdauthor, 'manual'),
112 ('install/index.rst', 'install.tex',
113 'Installing Python Modules', _stdauthor, 'manual'),
114 ('library/index.rst', 'library.tex',
115 'The Python Library Reference', _stdauthor, 'manual'),
116 ('reference/index.rst', 'reference.tex',
117 'The Python Language Reference', _stdauthor, 'manual'),
118 ('tutorial/index.rst', 'tutorial.tex',
119 'Python Tutorial', _stdauthor, 'manual'),
120 ('using/index.rst', 'using.tex',
121 'Using Python', _stdauthor, 'manual'),
122 ('whatsnew/' + version + '.rst', 'whatsnew.tex',
123 'What\'s New in Python', 'A. M. Kuchling', 'howto'),
124]
125# Collect all HOWTOs individually
Christian Heimes679db4a2008-01-18 09:56:22 +0000126latex_documents.extend(('howto/' + fn, 'howto-' + fn[:-4] + '.tex',
127 'HOWTO', _stdauthor, 'howto')
128 for fn in os.listdir('howto')
129 if fn.endswith('.rst') and fn != 'index.rst')
130
131# Additional stuff for the LaTeX preamble.
132latex_preamble = r'''
133\authoraddress{
134 \strong{Python Software Foundation}\\
135 Email: \email{docs@python.org}
136}
137'''
138
139# Documents to append as an appendix to all manuals.
140latex_appendices = ['glossary.rst', 'about.rst', 'license.rst', 'copyright.rst']