blob: 1c8dd71b49455a8c38884a35d47820735c570951 [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 Heimes26855632008-01-27 23:50:43 +000016extensions = ['sphinx.addons.refcounting']
17
Christian Heimes679db4a2008-01-18 09:56:22 +000018# General substitutions.
19project = 'Python'
Georg Brandl86def6c2008-01-21 20:36:10 +000020copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
Christian Heimes679db4a2008-01-18 09:56:22 +000021
Georg Brandl116aa622007-08-15 14:28:22 +000022# The default replacements for |version| and |release|.
Georg Brandl116aa622007-08-15 14:28:22 +000023#
24# The short X.Y version.
25# version = '2.6'
Georg Brandl116aa622007-08-15 14:28:22 +000026# The full version, including alpha/beta/rc tags.
27# release = '2.6a0'
Georg Brandl86def6c2008-01-21 20:36:10 +000028
29# We look for the Include/patchlevel.h file in the current Python source tree
30# and replace the values accordingly.
31import patchlevel
32version, release = patchlevel.get_version_info()
Georg Brandl116aa622007-08-15 14:28:22 +000033
34# There are two options for replacing |today|: either, you set today to some
35# non-false value, then it is used:
36today = ''
37# Else, today_fmt is used as the format for a strftime call.
38today_fmt = '%B %d, %Y'
39
Georg Brandl116aa622007-08-15 14:28:22 +000040# List of files that shouldn't be included in the build.
Christian Heimes3feef612008-02-11 06:19:17 +000041unused_docs = [
42 'whatsnew/2.0',
43 'whatsnew/2.1',
44 'whatsnew/2.2',
45 'whatsnew/2.3',
46 'whatsnew/2.4',
47 'whatsnew/2.5',
48 'whatsnew/2.6',
49 'maclib/scrap',
50 'library/xmllib',
51 'library/xml.etree',
Georg Brandl116aa622007-08-15 14:28:22 +000052]
53
Christian Heimes679db4a2008-01-18 09:56:22 +000054# Relative filename of the reference count data file.
55refcount_file = 'data/refcounts.dat'
56
Georg Brandl116aa622007-08-15 14:28:22 +000057# If true, '()' will be appended to :func: etc. cross-reference text.
58add_function_parentheses = True
59
60# If true, the current module name will be prepended to all description
61# unit titles (such as .. function::).
62add_module_names = True
Christian Heimes2c181612007-12-17 20:04:13 +000063
64
65# Options for HTML output
66# -----------------------
67
Christian Heimes2c181612007-12-17 20:04:13 +000068# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
69# using the given strftime format.
70html_last_updated_fmt = '%b %d, %Y'
71
72# If true, SmartyPants will be used to convert quotes and dashes to
73# typographically correct entities.
74html_use_smartypants = True
75
Christian Heimes679db4a2008-01-18 09:56:22 +000076# Content template for the index page, filename relative to this file.
77html_index = 'tools/sphinxext/indexcontent.html'
78
79# Custom sidebar templates, filenames relative to this file.
80html_sidebars = {
81 'index': 'tools/sphinxext/indexsidebar.html',
82}
83
84# Additional templates that should be rendered to pages.
85html_additional_pages = {
86 'download': 'tools/sphinxext/download.html',
87}
88
89# Output file base name for HTML help builder.
90htmlhelp_basename = 'pydoc'
91
Christian Heimes2c181612007-12-17 20:04:13 +000092
93# Options for LaTeX output
94# ------------------------
95
Christian Heimes679db4a2008-01-18 09:56:22 +000096# The paper size ('letter' or 'a4').
97latex_paper_size = 'a4'
Christian Heimes2c181612007-12-17 20:04:13 +000098
Christian Heimes679db4a2008-01-18 09:56:22 +000099# The font size ('10pt', '11pt' or '12pt').
100latex_font_size = '10pt'
101
102# Grouping the document tree into LaTeX files. List of tuples
103# (source start file, target name, title, author, document class [howto/manual]).
104_stdauthor = r'Guido van Rossum\\Fred L. Drake, Jr., editor'
105latex_documents = [
Christian Heimes292d3512008-02-03 16:51:08 +0000106 ('c-api/index', 'c-api.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000107 'The Python/C API', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000108 ('distutils/index', 'distutils.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000109 'Distributing Python Modules', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000110 ('documenting/index', 'documenting.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000111 'Documenting Python', 'Georg Brandl', 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000112 ('extending/index', 'extending.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000113 'Extending and Embedding Python', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000114 ('install/index', 'install.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000115 'Installing Python Modules', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000116 ('library/index', 'library.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000117 'The Python Library Reference', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000118 ('reference/index', 'reference.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000119 'The Python Language Reference', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000120 ('tutorial/index', 'tutorial.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000121 'Python Tutorial', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000122 ('using/index', 'using.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000123 'Using Python', _stdauthor, 'manual'),
Christian Heimes292d3512008-02-03 16:51:08 +0000124 ('whatsnew/' + version, 'whatsnew.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000125 'What\'s New in Python', 'A. M. Kuchling', 'howto'),
126]
127# Collect all HOWTOs individually
Christian Heimes292d3512008-02-03 16:51:08 +0000128latex_documents.extend(('howto/' + fn[:-4], 'howto-' + fn[:-4] + '.tex',
Christian Heimes679db4a2008-01-18 09:56:22 +0000129 'HOWTO', _stdauthor, 'howto')
130 for fn in os.listdir('howto')
131 if fn.endswith('.rst') and fn != 'index.rst')
132
133# Additional stuff for the LaTeX preamble.
134latex_preamble = r'''
135\authoraddress{
136 \strong{Python Software Foundation}\\
137 Email: \email{docs@python.org}
138}
139'''
140
141# Documents to append as an appendix to all manuals.
Christian Heimes292d3512008-02-03 16:51:08 +0000142latex_appendices = ['glossary', 'about', 'license', 'copyright']