]> granicus.if.org Git - python/commitdiff
Add a monkeypatching hack so that the docs can still be built with Sphinx 0.5.
authorGeorg Brandl <georg@python.org>
Sat, 11 Apr 2009 20:34:17 +0000 (20:34 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 11 Apr 2009 20:34:17 +0000 (20:34 +0000)
Doc/tools/sphinxext/pyspecific.py

index 688de95b8ea09bb9d94cf36b20d4190e2856c1f7..be6f78dfa005cae7b545f75dfc65f13cec1ec0cf 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.
 """
 
@@ -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