]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport from the 2.6 branch:
authorMatthias Klose <doko@ubuntu.com>
Tue, 14 Apr 2009 08:00:41 +0000 (08:00 +0000)
committerMatthias Klose <doko@ubuntu.com>
Tue, 14 Apr 2009 08:00:41 +0000 (08:00 +0000)
r71499 | georg.brandl | 2009-04-11 22:34:17 +0200 (Sa, 11. Apr 2009) | 1 line

Add a monkeypatching hack so that the docs can still be built with Sphinx 0.5.

Doc/tools/sphinxext/pyspecific.py

index 465f896af3916abcd7e544a43d761e6bad5fa87c..c6e7b511ede34486ecf9a68918843d18909be701 100644 (file)
@@ -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.
 """
 
@@ -57,7 +57,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