Commit 09f79172 authored by Robert Bradshaw's avatar Robert Bradshaw

Use our copy of the grammar.

parent 33d6f76f
......@@ -4,6 +4,7 @@ try:
except ImportError:
from distutils.core import setup, Extension
import os
import stat
import subprocess
import sys
......@@ -128,18 +129,17 @@ def compile_cython_modules(profile=False, compile_more=False, cython_with_refnan
print "Unable to find pgen, not compiling formal grammar."
else:
parser_dir = os.path.join(os.path.dirname(__file__), 'Cython', 'Parser')
print ' '.join([
pgen,
os.path.join(get_python_inc(), '..', 'Grammar', 'Grammar'),
os.path.join(parser_dir, 'graminit.h'),
os.path.join(parser_dir, 'graminit.c'),
])
grammar = os.path.join(parser_dir, 'Grammar')
subprocess.check_call([
pgen,
os.path.join(get_python_inc(), '..', 'Grammar', 'Grammar'),
os.path.join(grammar),
os.path.join(parser_dir, 'graminit.h'),
os.path.join(parser_dir, 'graminit.c'),
])
cst_pyx = os.path.join(parser_dir, 'ConcreteSyntaxTree.pyx')
if os.stat(grammar)[stat.ST_MTIME] > os.stat(cst_pyx)[stat.ST_MTIME]:
mtime = os.stat(grammar)[stat.ST_MTIME]
os.utime(cst_pyx, (mtime, mtime))
compiled_modules.extend([
"Cython.Parser.ConcreteSyntaxTree",
])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment