summaryrefslogtreecommitdiff
path: root/tests/root/conf.py
blob: d268ae3a5a96a667275ca565a766c6d53daef5a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*- coding: utf-8 -*-

import sys, os

sys.path.append(os.path.abspath('.'))

extensions = ['ext', 'sphinx.ext.autodoc', 'sphinx.ext.jsmath',
              'sphinx.ext.coverage', 'sphinx.ext.todo',
              'sphinx.ext.autosummary']

jsmath_path = 'dummy.js'

templates_path = ['_templates']

master_doc = 'contents'
source_suffix = '.txt'

project = 'Sphinx <Tests>'
copyright = '2008, Georg Brandl & Team'
# If this is changed, remember to update the versionchanges!
version = '0.6'
release = '0.6alpha1'
today_fmt = '%B %d, %Y'
#unused_docs = []
exclude_trees = ['_build']
keep_warnings = True
pygments_style = 'sphinx'
show_authors = True

rst_epilog = '.. |subst| replace:: global substitution'

html_theme = 'testtheme'
html_theme_path = ['.']
html_theme_options = {'testopt': 'testoverride'}

html_style = 'default.css'
html_static_path = ['_static']
html_last_updated_fmt = '%b %d, %Y'
html_context = {'hckey': 'hcval'}

htmlhelp_basename = 'SphinxTestsdoc'

latex_documents = [
  ('contents', 'SphinxTests.tex', 'Sphinx Tests Documentation',
   'Georg Brandl', 'manual'),
]

latex_additional_files = ['svgimg.svg']

value_from_conf_py = 84

coverage_c_path = ['special/*.h']
# XXX cfunction?
coverage_c_regexes = {'cfunction': r'^PyAPI_FUNC\(.*\)\s+([^_][\w_]+)'}

autosummary_generate = ['autosummary']

# modify tags from conf.py
tags.add('confpytag')

from sphinx import addnodes

def userdesc_parse(env, sig, signode):
    x, y = sig.split(':')
    signode += addnodes.desc_name(x, x)
    signode += addnodes.desc_parameterlist()
    signode[-1] += addnodes.desc_parameter(y, y)
    return x

def setup(app):
    app.add_config_value('value_from_conf_py', 42, False)
    app.add_description_unit('userdesc', 'userdescrole', '%s (userdesc)',
                             userdesc_parse)