Navigation Menu

Skip to content

Commit

Permalink
doc: add workaround for slow "sphinx-build gettext"
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 5, 2014
1 parent 9a291ab commit 5cf09d4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/source/conf.py
Expand Up @@ -273,3 +273,19 @@

# -- Options for Gettext --------------------------------------------------
gettext_uuid = False

# Workaround for slow gettext builder.
# TODO: REMOVE ME when issue#1426 is fixed
# See also: https://bitbucket.org/birkenfeld/sphinx/issue/1426/gettext-builder-is-very-slow-during-read
def setup(app):
# disable versioning for speed
from sphinx.builders.gettext import I18nBuilder
I18nBuilder.versioning_method = 'none'

def doctree_read(app, doctree):
if not isinstance(app.builder, I18nBuilder):
return
from docutils import nodes
from sphinx.versioning import add_uids
list(add_uids(doctree, nodes.TextElement))
app.connect('doctree-read', doctree_read)

0 comments on commit 5cf09d4

Please sign in to comment.