blob: 7a4c2713828313ff4ae733044de428a86bd33926 [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +00001# -*- coding: utf-8 -*-
2#
3# Python documentation build configuration file
4#
Georg Brandl7155a092008-01-16 20:27:56 +00005# This file is execfile()d with the current directory set to its containing dir.
6#
Georg Brandl8ec7f652007-08-15 14:28:01 +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).
Georg Brandleee1fc52007-12-16 19:36:51 +00009
Georg Brandldd76e052008-01-21 20:20:53 +000010import sys, os, time
11sys.path.append('tools/sphinxext')
12
Georg Brandleee1fc52007-12-16 19:36:51 +000013# General configuration
14# ---------------------
Georg Brandl8ec7f652007-08-15 14:28:01 +000015
Georg Brandl7155a092008-01-16 20:27:56 +000016# General substitutions.
17project = 'Python'
Georg Brandldd76e052008-01-21 20:20:53 +000018copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
Georg Brandl7155a092008-01-16 20:27:56 +000019
Georg Brandl8ec7f652007-08-15 14:28:01 +000020# The default replacements for |version| and |release|.
Georg Brandl8ec7f652007-08-15 14:28:01 +000021#
22# The short X.Y version.
23# version = '2.6'
Georg Brandl8ec7f652007-08-15 14:28:01 +000024# The full version, including alpha/beta/rc tags.
25# release = '2.6a0'
Georg Brandldd76e052008-01-21 20:20:53 +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 Brandl8ec7f652007-08-15 14:28:01 +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 Brandl8ec7f652007-08-15 14:28:01 +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 'maclib/scrap.rst',
47 'library/xmllib.rst',
48 'library/xml.etree.rst',
49]
50
Georg Brandl7155a092008-01-16 20:27:56 +000051# Relative filename of the reference count data file.
52refcount_file = 'data/refcounts.dat'
53
Georg Brandl8ec7f652007-08-15 14:28:01 +000054# If true, '()' will be appended to :func: etc. cross-reference text.
55add_function_parentheses = True
56
57# If true, the current module name will be prepended to all description
58# unit titles (such as .. function::).
59add_module_names = True
Georg Brandleee1fc52007-12-16 19:36:51 +000060
61
62# Options for HTML output
63# -----------------------
64
Georg Brandleee1fc52007-12-16 19:36:51 +000065# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
66# using the given strftime format.
67html_last_updated_fmt = '%b %d, %Y'
68
69# If true, SmartyPants will be used to convert quotes and dashes to
70# typographically correct entities.
71html_use_smartypants = True
72
Georg Brandl7155a092008-01-16 20:27:56 +000073# Content template for the index page, filename relative to this file.
74html_index = 'tools/sphinxext/indexcontent.html'
75
76# Custom sidebar templates, filenames relative to this file.
77html_sidebars = {
78 'index': 'tools/sphinxext/indexsidebar.html',
79}
80
81# Additional templates that should be rendered to pages.
82html_additional_pages = {
83 'download': 'tools/sphinxext/download.html',
84}
85
86# Output file base name for HTML help builder.
87htmlhelp_basename = 'pydoc'
88
Georg Brandleee1fc52007-12-16 19:36:51 +000089
90# Options for LaTeX output
91# ------------------------
92
Georg Brandl7155a092008-01-16 20:27:56 +000093# The paper size ('letter' or 'a4').
94latex_paper_size = 'a4'
Georg Brandleee1fc52007-12-16 19:36:51 +000095
Georg Brandl7155a092008-01-16 20:27:56 +000096# The font size ('10pt', '11pt' or '12pt').
97latex_font_size = '10pt'
98
99# Grouping the document tree into LaTeX files. List of tuples
100# (source start file, target name, title, author, document class [howto/manual]).
101_stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor'
102latex_documents = [
103 ('c-api/index.rst', 'c-api.tex',
104 'The Python/C API', _stdauthor, 'manual'),
105 ('distutils/index.rst', 'distutils.tex',
106 'Distributing Python Modules', _stdauthor, 'manual'),
107 ('documenting/index.rst', 'documenting.tex',
108 'Documenting Python', 'Georg Brandl', 'manual'),
109 ('extending/index.rst', 'extending.tex',
110 'Extending and Embedding Python', _stdauthor, 'manual'),
111 ('install/index.rst', 'install.tex',
112 'Installing Python Modules', _stdauthor, 'manual'),
113 ('library/index.rst', 'library.tex',
114 'The Python Library Reference', _stdauthor, 'manual'),
115 ('reference/index.rst', 'reference.tex',
116 'The Python Language Reference', _stdauthor, 'manual'),
117 ('tutorial/index.rst', 'tutorial.tex',
118 'Python Tutorial', _stdauthor, 'manual'),
119 ('using/index.rst', 'using.tex',
120 'Using Python', _stdauthor, 'manual'),
121 ('whatsnew/' + version + '.rst', 'whatsnew.tex',
122 'What\'s New in Python', 'A. M. Kuchling', 'howto'),
123]
124# Collect all HOWTOs individually
Georg Brandl7155a092008-01-16 20:27:56 +0000125latex_documents.extend(('howto/' + fn, 'howto-' + fn[:-4] + '.tex',
126 'HOWTO', _stdauthor, 'howto')
127 for fn in os.listdir('howto')
128 if fn.endswith('.rst') and fn != 'index.rst')
129
130# Additional stuff for the LaTeX preamble.
131latex_preamble = r'''
132\authoraddress{
133 \strong{Python Software Foundation}\\
134 Email: \email{docs@python.org}
135}
136'''
137
138# Documents to append as an appendix to all manuals.
139latex_appendices = ['glossary.rst', 'about.rst', 'license.rst', 'copyright.rst']