Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
others fixes for Sphinx 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Dec 8, 2016
1 parent b8221c5 commit 61c373d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pyquickhelper/helpgen/convert_doc_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
6 changes: 4 additions & 2 deletions src/pyquickhelper/helpgen/convert_doc_sphinx_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 61c373d

Please sign in to comment.