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.
This commit is contained in:
Takeshi KOMIYA
2016-07-12 12:15:12 +09:00
parent e1e82e43c9
commit 2ccb75c98f
4 changed files with 34 additions and 18 deletions
+5
View File
@@ -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.