diff options
author | Georg Brandl <georg@python.org> | 2009-01-26 23:06:17 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-01-26 23:06:17 (GMT) |
commit | badbba4f99c13e8ebc804ec0f404665a3d89fc11 (patch) | |
tree | ad822cafbbd082782978503db70e3067c0559a22 /Doc/tools | |
parent | 6723644c5eef9f704dfbc978249cb3faf0d5e262 (diff) | |
download | cpython-badbba4f99c13e8ebc804ec0f404665a3d89fc11.zip cpython-badbba4f99c13e8ebc804ec0f404665a3d89fc11.tar.gz cpython-badbba4f99c13e8ebc804ec0f404665a3d89fc11.tar.bz2 |
Allow docs to be built with Sphinx 0.5.x.
Diffstat (limited to 'Doc/tools')
-rw-r--r-- | Doc/tools/sphinxext/pyspecific.py | 11 | ||||
-rw-r--r-- | Doc/tools/sphinxext/suspicious.py | 7 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py index 018f4ac..48ce6da 100644 --- a/Doc/tools/sphinxext/pyspecific.py +++ b/Doc/tools/sphinxext/pyspecific.py @@ -48,8 +48,15 @@ from pprint import pformat from docutils.io import StringOutput from docutils.utils import new_document -from sphinx.builders import Builder -from sphinx.writers.text import TextWriter +try: + from sphinx.builders import Builder +except ImportError: + from sphinx.builder import Builder + +try: + from sphinx.writers.text import TextWriter +except ImportError: + from sphinx.textwriter import TextWriter class PydocTopicsBuilder(Builder): diff --git a/Doc/tools/sphinxext/suspicious.py b/Doc/tools/sphinxext/suspicious.py index ae11793..245a759 100644 --- a/Doc/tools/sphinxext/suspicious.py +++ b/Doc/tools/sphinxext/suspicious.py @@ -45,7 +45,12 @@ import os, sys import csv import re from docutils import nodes -from sphinx.builders import Builder + +try: + from sphinx.builders import Builder +except ImportError: + from sphinx.builder import Builder + detect_all = re.compile(ur''' ::(?=[^=])| # two :: (but NOT ::=) |