Commit 0befa5f7 authored by Stefan Behnel's avatar Stefan Behnel

blacklist distutils.extension in pyximport

parent 3dd2aed3
...@@ -261,7 +261,7 @@ class PyImporter(PyxImporter): ...@@ -261,7 +261,7 @@ class PyImporter(PyxImporter):
self.super = super(PyImporter, self) self.super = super(PyImporter, self)
self.super.__init__(extension='.py', pyxbuild_dir=pyxbuild_dir) self.super.__init__(extension='.py', pyxbuild_dir=pyxbuild_dir)
self.uncompilable_modules = {} self.uncompilable_modules = {}
self.blocked_modules = ['Cython'] self.blocked_modules = ['Cython', 'distutils.extension']
def find_module(self, fullname, package_path=None): def find_module(self, fullname, package_path=None):
if fullname in sys.modules: if fullname in sys.modules:
...@@ -288,13 +288,13 @@ class PyImporter(PyxImporter): ...@@ -288,13 +288,13 @@ class PyImporter(PyxImporter):
try: try:
importer = self.super.find_module(fullname, package_path) importer = self.super.find_module(fullname, package_path)
if importer is not None: if importer is not None:
if DEBUG_IMPORT:
print("importer found")
try: try:
if importer.init_path: if importer.init_path:
path = importer.init_path path = importer.init_path
else: else:
path = importer.path path = importer.path
if DEBUG_IMPORT:
print("importer found path %s" % path)
build_module(fullname, path, build_module(fullname, path,
pyxbuild_dir=self.pyxbuild_dir) pyxbuild_dir=self.pyxbuild_dir)
except Exception, e: except Exception, e:
......
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