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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
7ecf30ab
Commit
7ecf30ab
authored
Apr 25, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use .pyx files for Importer to avoid distutils bytecode compilation
parent
6da41b8b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
Cython/Compiler/FusedNode.pyx
Cython/Compiler/FusedNode.pyx
+0
-0
Cython/Compiler/Importer.py
Cython/Compiler/Importer.py
+13
-0
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+1
-2
No files found.
Cython/Compiler/FusedNode.py
→
Cython/Compiler/FusedNode.py
x
View file @
7ecf30ab
File moved
Cython/Compiler/Importer.py
View file @
7ecf30ab
...
@@ -5,6 +5,7 @@ that is not supported in certain Python versions but which is supported
...
@@ -5,6 +5,7 @@ that is not supported in certain Python versions but which is supported
by Cython.
by Cython.
"""
"""
import
os
import
sys
import
sys
import
imp
import
imp
...
@@ -50,3 +51,15 @@ def importer(modulename, compile=False, version=None):
...
@@ -50,3 +51,15 @@ def importer(modulename, compile=False, version=None):
return
_import_normal
(
modulename
)
return
_import_normal
(
modulename
)
except
SyntaxError
:
except
SyntaxError
:
return
_import_compile
(
modulename
)
return
_import_compile
(
modulename
)
def
importer
(
modulename
):
try
:
# Check for an already compiled module
return
__import__
(
modulename
,
None
,
None
,
[
''
])
except
ImportError
:
pass
dirname
=
os
.
path
.
dirname
root
=
dirname
(
dirname
(
dirname
(
os
.
path
.
abspath
(
__file__
))))
filename
=
os
.
path
.
join
(
root
,
*
modulename
.
split
(
'.'
))
+
".pyx"
return
pyximport
.
load_module
(
modulename
,
filename
)
\ No newline at end of file
Cython/Compiler/ParseTreeTransforms.py
View file @
7ecf30ab
...
@@ -1489,8 +1489,7 @@ if VALUE is not None:
...
@@ -1489,8 +1489,7 @@ if VALUE is not None:
return
node
return
node
FusedNode
=
Importer
.
importer
(
"Cython.Compiler.FusedNode"
,
FusedNode
=
Importer
.
importer
(
"Cython.Compiler.FusedNode"
)
version
=
(
2
,
5
))
node
=
FusedNode
.
FusedCFuncDefNode
(
node
,
env
)
node
=
FusedNode
.
FusedCFuncDefNode
(
node
,
env
)
self
.
fused_function
=
node
self
.
fused_function
=
node
...
...
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