Skip to content
Permalink
Browse files

fix import issue with sphinx (circular references)

  • Loading branch information...
sdpython committed Apr 30, 2018
1 parent a3c0afd commit 146823f2ad3de596efdf6622ce1643058c4c24e2
@@ -1331,7 +1331,12 @@ def add_node(self, node, **kwds):
from sphinx.writers.html5 import HTML5Translator
translators.append(HTML5Translator)
elif key == 'latex':
from sphinx.writers.latex import LaTeXTranslator
try:
from sphinx.writers.latex import LaTeXTranslator
except ImportError:
# Since sphinx 1.7.3 (circular reference).
import sphinx.builders.latex.transforms
from sphinx.writers.latex import LaTeXTranslator
translators.append(LaTeXTranslator)
elif key == 'text':
from sphinx.writers.text import TextTranslator
@@ -138,7 +138,12 @@ def add_node(self, node, **kwds):
from sphinx.writers.html5 import HTML5Translator
translators.append(HTML5Translator)
elif key == 'latex':
from sphinx.writers.latex import LaTeXTranslator
try:
from sphinx.writers.latex import LaTeXTranslator
except ImportError:
# Since sphinx 1.7.3 (circular reference).
import sphinx.builders.latex.transforms
from sphinx.writers.latex import LaTeXTranslator
translators.append(LaTeXTranslator)
elif key == 'text':
from sphinx.writers.text import TextTranslator

0 comments on commit 146823f

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