Skip to content
Permalink
Browse files

others fixes for Sphinx 1.5

  • Loading branch information...
sdpython committed Dec 8, 2016
1 parent b8221c5 commit 61c373df5e09dfa227aa5162106c221f173e22d2
@@ -329,13 +329,13 @@ def connect(self, node, func):

def add_domain(self, domain):
if domain.name in self.domains:
raise ExtensionError(
raise Exception(
'domain %s already registered' % domain.name)
self.domains[domain.name] = domain

def add_event(self, name):
if name in self._events:
raise ExtensionError('Event %r already present' % name)
raise Exception('Event %r already present' % name)
self._events[name] = ''

title_names = []
@@ -226,6 +226,7 @@ def __init__(self):
self.app = _CustomSphinx(srcdir=None, confdir=None, outdir=None, doctreedir=None,
buildername='SerializingHTMLBuilder')
builder = self.app.builder
builder.fignumbers = {}
HTMLWriter.__init__(self, builder)
self.translator_class = HTMLTranslatorWithCustomDirectives
self.builder.translator_class = self.translator_class
@@ -306,7 +307,8 @@ def __init__(self, srcdir, confdir, outdir, doctreedir, buildername,
'''
from sphinx.application import events, bold, Tags, builtin_extensions
from sphinx.application import Config, CONFIG_FILENAME, ConfigError, VersionRequirementError
from sphinx.domains.cpp import CPPDomain
from sphinx import __display_version__
# from sphinx.domains.cpp import CPPDomain
# from sphinx.domains.javascript import JavaScriptDomain
# from sphinx.domains.python import PythonDomain
# from sphinx.domains.std import StandardDomain
@@ -379,7 +381,7 @@ def __init__(self, srcdir, confdir, outdir, doctreedir, buildername,
self.config.pre_init_values(self.warn)

# check the Sphinx version if requested
if self.config.needs_sphinx and self.config.needs_sphinx > sphinx.__display_version__:
if self.config.needs_sphinx and self.config.needs_sphinx > __display_version__:
raise VersionRequirementError(
'This project needs at least Sphinx v%s and therefore cannot '
'be built with this version.' % self.config.needs_sphinx)

0 comments on commit 61c373d

Please sign in to comment.
You can’t perform that action at this time.