mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
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:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user