Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-07-10 18:27:06 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2016-07-12 06:15:12 +0300
commit2ccb75c98fbe7e69e4689725affa268e7c538315 (patch)
tree80e649ad94ccc653685489a34cb6f5c071f8474a /setup.py
parente1e82e43c9280e7486aad49c7f84a75f4ee1654b (diff)
Bundle sphinx/pycode/Grammar-*.pickle (ref: #2765)
So far, sphinx generates the grammar files on demand. It causes uninstallation does not remove whole of files. With this fix, Sphinx bundles the files in the package.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index c1aa346ba..ef7f5da09 100644
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,7 @@ import sys
from distutils import log
import sphinx
+from sphinx.pycode.pgen2.driver import compile_grammar
long_desc = '''
Sphinx is a tool that makes it easy to create intelligent and beautiful
@@ -72,6 +73,10 @@ extras_require = {
if sys.platform == 'win32':
requires.append('colorama>=0.3.5')
+# Compile grammars before packaging
+compile_grammar('sphinx/pycode/Grammar-py2.txt')
+compile_grammar('sphinx/pycode/Grammar-py3.txt')
+
# Provide a "compile_catalog" command that also creates the translated
# JavaScript files if Babel is available.