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
Gwenaël Samain
cython
Commits
50241a06
Commit
50241a06
authored
Apr 27, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Importer version check and setup PyxArgs in pyximport
parent
9736e26b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
Cython/Compiler/Importer.py
Cython/Compiler/Importer.py
+5
-1
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+2
-1
No files found.
Cython/Compiler/Importer.py
View file @
50241a06
...
...
@@ -11,6 +11,10 @@ import imp
import
pyximport
# set up the PyxArgs global variable in pyximport (why is that a global :)
importers
=
pyximport
.
install
(
pyimport
=
True
)
pyximport
.
uninstall
(
*
importers
)
def
importer
(
modulename
,
version
=
None
):
try
:
# Check for an already compiled module
...
...
@@ -22,7 +26,7 @@ def importer(modulename, version=None):
root
=
dirname
(
dirname
(
dirname
(
os
.
path
.
abspath
(
__file__
))))
filename
=
os
.
path
.
join
(
root
,
*
modulename
.
split
(
'.'
))
+
".pyx"
if
version
and
version
<
sys
.
version_info
[:
2
]
:
if
version
and
sys
.
version_info
[:
2
]
<
version
:
return
pyximport
.
load_module
(
modulename
,
filename
)
else
:
mod
=
imp
.
new_module
(
modulename
)
...
...
Cython/Compiler/ParseTreeTransforms.py
View file @
50241a06
...
...
@@ -1489,7 +1489,8 @@ if VALUE is not None:
return
node
FusedNode
=
Importer
.
importer
(
"Cython.Compiler.FusedNode"
)
FusedNode
=
Importer
.
importer
(
"Cython.Compiler.FusedNode"
,
version
=
(
2
,
5
))
node
=
FusedNode
.
FusedCFuncDefNode
(
node
,
env
)
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