[Groonga-commit] groonga/groonga at 5cf09d4 [master] doc: add workaround for slow "sphinx-build gettext"

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jun 5 12:01:56 JST 2014


Kouhei Sutou	2014-06-05 12:01:56 +0900 (Thu, 05 Jun 2014)

  New Revision: 5cf09d4bef7c6f2d5988b57d69119b6d466aa6a8
  https://github.com/groonga/groonga/commit/5cf09d4bef7c6f2d5988b57d69119b6d466aa6a8

  Message:
    doc: add workaround for slow "sphinx-build gettext"
    
    It should be removed...
    
    See also:
    
      * https://bitbucket.org/birkenfeld/sphinx/issue/1426/gettext-builder-is-very-slow-during-read
      * https://gist.github.com/knzm/4053935

  Modified files:
    doc/source/conf.py

  Modified: doc/source/conf.py (+16 -0)
===================================================================
--- doc/source/conf.py    2014-06-05 11:57:35 +0900 (0f42e79)
+++ doc/source/conf.py    2014-06-05 12:01:56 +0900 (62b47b9)
@@ -273,3 +273,19 @@ man_pages = [
 
 # -- 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)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index