Commit 50241a06 authored by Mark Florisson's avatar Mark Florisson

Fix Importer version check and setup PyxArgs in pyximport

parent 9736e26b
......@@ -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)
......
......@@ -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
......
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