2008-03-09 21:32:24 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
#
|
2009-01-10 20:45:45 +01:00
|
|
|
# Sphinx documentation build configuration file
|
2008-03-09 21:32:24 +00:00
|
|
|
|
2010-01-17 18:16:14 +01:00
|
|
|
import re
|
|
|
|
|
import sphinx
|
2008-03-09 21:32:24 +00:00
|
|
|
|
2009-04-04 22:05:04 +03:00
|
|
|
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',
|
2010-02-28 17:24:55 +01:00
|
|
|
'sphinx.ext.autosummary', 'sphinx.ext.extlinks']
|
2009-05-02 20:38:45 +02:00
|
|
|
|
2008-03-09 21:32:24 +00:00
|
|
|
master_doc = 'contents'
|
2010-01-17 18:16:14 +01:00
|
|
|
templates_path = ['_templates']
|
2010-01-06 15:48:39 +01:00
|
|
|
exclude_patterns = ['_build']
|
|
|
|
|
|
2008-03-09 21:32:24 +00:00
|
|
|
project = 'Sphinx'
|
2010-01-01 14:09:13 +01:00
|
|
|
copyright = '2007-2010, Georg Brandl'
|
2008-08-30 21:56:43 +00:00
|
|
|
version = sphinx.__released__
|
2008-04-27 20:12:41 +00:00
|
|
|
release = version
|
2008-03-09 21:32:24 +00:00
|
|
|
show_authors = True
|
|
|
|
|
|
2010-05-25 23:59:22 +02:00
|
|
|
html_theme = 'sphinxdoc'
|
2009-01-10 21:54:26 +01:00
|
|
|
modindex_common_prefix = ['sphinx.']
|
2008-03-21 15:20:50 +00:00
|
|
|
html_static_path = ['_static']
|
2010-01-07 17:56:09 +01:00
|
|
|
html_sidebars = {'index': ['indexsidebar.html', 'searchbox.html']}
|
2008-04-19 21:28:24 +00:00
|
|
|
html_additional_pages = {'index': 'index.html'}
|
2008-05-03 20:18:53 +00:00
|
|
|
html_use_opensearch = 'http://sphinx.pocoo.org'
|
2008-04-27 18:09:49 +00:00
|
|
|
|
2008-03-09 21:32:24 +00:00
|
|
|
htmlhelp_basename = 'Sphinxdoc'
|
|
|
|
|
|
2009-12-29 12:32:42 +01:00
|
|
|
epub_theme = 'epub'
|
2009-12-28 17:09:09 +01:00
|
|
|
epub_basename = 'sphinx'
|
2009-12-29 12:32:42 +01:00
|
|
|
epub_author = 'Georg Brandl'
|
2009-12-28 17:09:09 +01:00
|
|
|
epub_publisher = 'http://sphinx.pocoo.org/'
|
|
|
|
|
epub_scheme = 'url'
|
|
|
|
|
epub_identifier = epub_publisher
|
2010-06-07 22:28:48 +02:00
|
|
|
epub_pre_files = [('index.html', 'Welcome')]
|
2009-12-28 17:09:09 +01:00
|
|
|
epub_exclude_files = ['_static/opensearch.xml', '_static/doctools.js',
|
2010-06-03 15:39:24 +02:00
|
|
|
'_static/jquery.js', '_static/searchtools.js', '_static/underscore.js',
|
2009-12-28 17:09:09 +01:00
|
|
|
'_static/basic.css', 'search.html']
|
|
|
|
|
|
2008-03-09 21:32:24 +00:00
|
|
|
latex_documents = [('contents', 'sphinx.tex', 'Sphinx Documentation',
|
2008-05-04 21:35:03 +00:00
|
|
|
'Georg Brandl', 'manual', 1)]
|
2008-04-27 19:43:45 +00:00
|
|
|
latex_logo = '_static/sphinx.png'
|
2008-09-24 16:18:45 +00:00
|
|
|
latex_elements = {
|
2009-06-04 17:50:37 +02:00
|
|
|
'fontpkg': '\\usepackage{palatino}',
|
2008-09-24 16:18:45 +00:00
|
|
|
}
|
2008-03-09 21:32:24 +00:00
|
|
|
|
2010-02-28 14:45:43 +01:00
|
|
|
autodoc_member_order = 'groupwise'
|
2008-11-09 19:46:32 +01:00
|
|
|
todo_include_todos = True
|
2010-05-24 13:06:55 +02:00
|
|
|
extlinks = {'duref': ('http://docutils.sourceforge.net/docs/ref/rst/'
|
|
|
|
|
'restructuredtext.html#%s', ''),
|
|
|
|
|
'durole': ('http://docutils.sourceforge.net/docs/ref/rst/'
|
|
|
|
|
'roles.html#%s', ''),
|
|
|
|
|
'dudir': ('http://docutils.sourceforge.net/docs/ref/rst/'
|
|
|
|
|
'directives.html#%s', '')}
|
2008-11-09 19:46:32 +01:00
|
|
|
|
2010-02-21 11:50:08 +01:00
|
|
|
man_pages = [
|
|
|
|
|
('contents', 'sphinx-all', 'Sphinx documentation generator system manual',
|
|
|
|
|
'Georg Brandl', 1),
|
2010-02-25 22:22:01 +01:00
|
|
|
('man/sphinx-build', 'sphinx-build', 'Sphinx documentation generator tool',
|
|
|
|
|
'', 1),
|
|
|
|
|
('man/sphinx-quickstart', 'sphinx-quickstart', 'Sphinx documentation '
|
|
|
|
|
'template generator', '', 1),
|
2010-02-21 11:50:08 +01:00
|
|
|
]
|
|
|
|
|
|
2010-09-16 02:16:27 -05:00
|
|
|
texinfo_documents = [
|
|
|
|
|
('contents', 'sphinx', 'Sphinx Documentation', 'Georg Brandl',
|
|
|
|
|
'Sphinx', 'The Sphinx documentation builder.', 'Documentation tools',
|
|
|
|
|
1),
|
|
|
|
|
]
|
|
|
|
|
|
2010-08-05 13:39:23 +02:00
|
|
|
# We're not using intersphinx right now, but if we did, this would be part of
|
|
|
|
|
# the mapping:
|
|
|
|
|
intersphinx_mapping = {'python': ('http://docs.python.org/dev', None)}
|
|
|
|
|
|
2008-11-09 19:46:32 +01:00
|
|
|
|
2009-01-10 20:45:45 +01:00
|
|
|
# -- Extension interface -------------------------------------------------------
|
2008-04-06 17:38:55 +00:00
|
|
|
|
|
|
|
|
from sphinx import addnodes
|
|
|
|
|
|
|
|
|
|
|
2008-05-31 16:14:36 +00:00
|
|
|
event_sig_re = re.compile(r'([a-zA-Z-]+)\s*\((.*)\)')
|
|
|
|
|
|
|
|
|
|
def parse_event(env, sig, signode):
|
|
|
|
|
m = event_sig_re.match(sig)
|
|
|
|
|
if not m:
|
|
|
|
|
signode += addnodes.desc_name(sig, sig)
|
|
|
|
|
return sig
|
|
|
|
|
name, args = m.groups()
|
|
|
|
|
signode += addnodes.desc_name(name, name)
|
|
|
|
|
plist = addnodes.desc_parameterlist()
|
|
|
|
|
for arg in args.split(','):
|
|
|
|
|
arg = arg.strip()
|
|
|
|
|
plist += addnodes.desc_parameter(arg, arg)
|
|
|
|
|
signode += plist
|
|
|
|
|
return name
|
|
|
|
|
|
|
|
|
|
|
2008-04-06 17:38:55 +00:00
|
|
|
def setup(app):
|
2008-06-22 21:02:50 +00:00
|
|
|
from sphinx.ext.autodoc import cut_lines
|
|
|
|
|
app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
|
2009-01-10 22:18:18 +01:00
|
|
|
app.add_description_unit('confval', 'confval',
|
2009-09-08 00:04:05 +02:00
|
|
|
objname='configuration value',
|
|
|
|
|
indextemplate='pair: %s; configuration value')
|
2008-05-31 16:14:36 +00:00
|
|
|
app.add_description_unit('event', 'event', 'pair: %s; event', parse_event)
|