diff options
author | Georg Brandl <georg@python.org> | 2009-04-11 20:34:17 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-04-11 20:34:17 (GMT) |
commit | adf681526c7be4cb9b85b56176952f3bc7ed6421 (patch) | |
tree | 24cc466e8e9220c2f2343da7e3ba7212665c80fd /Doc/tools | |
parent | e91c6d7a9f9702e6ed66c68837b200fac8f83f7b (diff) | |
download | cpython-adf681526c7be4cb9b85b56176952f3bc7ed6421.zip cpython-adf681526c7be4cb9b85b56176952f3bc7ed6421.tar.gz cpython-adf681526c7be4cb9b85b56176952f3bc7ed6421.tar.bz2 |
Add a monkeypatching hack so that the docs can still be built with Sphinx 0.5.
Diffstat (limited to 'Doc/tools')
-rw-r--r-- | Doc/tools/sphinxext/pyspecific.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py index 688de95..be6f78d 100644 --- a/Doc/tools/sphinxext/pyspecific.py +++ b/Doc/tools/sphinxext/pyspecific.py @@ -5,7 +5,7 @@ Sphinx extension with Python doc-specific markup. - :copyright: 2008 by Georg Brandl. + :copyright: 2008, 2009 by Georg Brandl. :license: Python license. """ @@ -59,7 +59,11 @@ from docutils.utils import new_document try: from sphinx.builders import Builder except ImportError: + # using Sphinx < 0.6, which has a different package layout from sphinx.builder import Builder + # monkey-patch toctree directive to accept (and ignore) the :numbered: flag + from sphinx.directives.other import toctree_directive + toctree_directive.options['numbered'] = toctree_directive.options['glob'] try: from sphinx.writers.text import TextWriter |