mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Remove sphinx version from the filename of compiled grammar files
Now sphinx bundles the compiled grammar files. Then it will be replaced on upgrading sphinx. So the sphinx version is not needed on its filename.
This commit is contained in:
@@ -113,8 +113,7 @@ def get_compiled_path(filename):
|
|||||||
head, tail = os.path.splitext(filename)
|
head, tail = os.path.splitext(filename)
|
||||||
if tail == ".txt":
|
if tail == ".txt":
|
||||||
tail = ""
|
tail = ""
|
||||||
# embed Sphinx major version for the case we ever change the grammar...
|
return "%s%s.pickle" % (head, tail)
|
||||||
return "%s%s-sphinx%s.pickle" % (head, tail, ".".join(map(str, sphinx.version_info[:2])))
|
|
||||||
|
|
||||||
|
|
||||||
def compile_grammar(gt='Grammar.txt', logger=None):
|
def compile_grammar(gt='Grammar.txt', logger=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user