mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Add a monkeypatching hack so that the docs can still be built with Sphinx 0.5.
This commit is contained in:
parent
e91c6d7a9f
commit
adf681526c
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
Sphinx extension with Python doc-specific markup.
|
Sphinx extension with Python doc-specific markup.
|
||||||
|
|
||||||
:copyright: 2008 by Georg Brandl.
|
:copyright: 2008, 2009 by Georg Brandl.
|
||||||
:license: Python license.
|
:license: Python license.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -59,7 +59,11 @@ from docutils.utils import new_document
|
||||||
try:
|
try:
|
||||||
from sphinx.builders import Builder
|
from sphinx.builders import Builder
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
# using Sphinx < 0.6, which has a different package layout
|
||||||
from sphinx.builder import Builder
|
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:
|
try:
|
||||||
from sphinx.writers.text import TextWriter
|
from sphinx.writers.text import TextWriter
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue