diff options
author | Georg Brandl <georg@python.org> | 2013-01-19 21:14:50 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-01-19 21:14:50 +0100 |
commit | f913a666028a7ef57ac0c5e9d2fe36c40d64ea6b (patch) | |
tree | ef5d22ca417dabd5efc8fca36527e522a0e2d204 /tests/root/conf.py | |
parent | 0c198c902765d2bf1d9fdab2a3657d96226a6483 (diff) | |
parent | 819ec24ef527014c8ca7d5809c58eb6a0aa6c731 (diff) | |
download | sphinx-f913a666028a7ef57ac0c5e9d2fe36c40d64ea6b.tar.gz |
null merge with stable
Diffstat (limited to 'tests/root/conf.py')
-rw-r--r-- | tests/root/conf.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/root/conf.py b/tests/root/conf.py index b97ddfcc..37b9127e 100644 --- a/tests/root/conf.py +++ b/tests/root/conf.py @@ -3,6 +3,7 @@ import sys, os sys.path.append(os.path.abspath('.')) +sys.path.append(os.path.abspath('..')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.jsmath', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.autosummary', @@ -54,6 +55,11 @@ texinfo_documents = [ 'Georg Brandl \\and someone else', 'Sphinx Testing', 'Miscellaneous'), ] +man_pages = [ + ('contents', 'SphinxTests', 'Sphinx Tests Documentation', + 'Georg Brandl and someone else', 1), +] + value_from_conf_py = 84 coverage_c_path = ['special/*.h'] @@ -67,6 +73,28 @@ extlinks = {'issue': ('http://bugs.python.org/issue%s', 'issue '), # modify tags from conf.py tags.add('confpytag') +# -- linkcode + +if 'test_linkcode' in tags: + import glob + + extensions.remove('sphinx.ext.viewcode') + extensions.append('sphinx.ext.linkcode') + + exclude_patterns.extend(glob.glob('*.txt') + glob.glob('*/*.txt')) + exclude_patterns.remove('contents.txt') + exclude_patterns.remove('objects.txt') + + def linkcode_resolve(domain, info): + if domain == 'py': + fn = info['module'].replace('.', '/') + return "http://foobar/source/%s.py" % fn + elif domain == "js": + return "http://foobar/js/" + info['fullname'] + elif domain in ("c", "cpp"): + return "http://foobar/%s/%s" % (domain, "".join(info['names'])) + else: + raise AssertionError() # -- extension API |