Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
09f79172
Commit
09f79172
authored
Aug 21, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use our copy of the grammar.
parent
33d6f76f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
setup.py
setup.py
+7
-7
No files found.
setup.py
View file @
09f79172
...
...
@@ -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
(
g
et_python_inc
(),
'..'
,
'Grammar'
,
'Grammar'
),
os
.
path
.
join
(
g
rammar
),
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"
,
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment