Commit 19656b2d authored by Igor Kaplounenko's avatar Igor Kaplounenko

blocking all distutils from being compiled; removed distutils blacklists from...

blocking all distutils from being compiled; removed distutils blacklists from the pyimport test and deleted the 'slow' test as it is now redundant
parent 447bf748
......@@ -350,10 +350,7 @@ class PyImporter(PyxImporter):
language_level=language_level)
self.uncompilable_modules = {}
self.blocked_modules = ['Cython', 'pyxbuild', 'pyximport.pyxbuild',
'distutils.extension', 'distutils.sysconfig']
# on OS X, distutils appears to shadow distutils.sysconfig
if os.name is 'posix' and os.uname()[0].lower().startswith('darwin'):
self.blocked_modules.append('distutils')
'distutils']
def find_module(self, fullname, package_path=None):
if fullname in sys.modules:
......
......@@ -8,7 +8,6 @@ import pyximport
# blacklist for speed
import pyximport.pyxbuild, Cython.Compiler.Pipeline
import distutils.core, distutils.ccompiler, distutils.command.build
pyximport.install(pyximport=False, pyimport=True,
build_dir=os.path.join(os.path.dirname(__file__), "TEST_TMP"))
......
PYTHON -c "import pyimport_test; pyimport_test.test()"
######## pyimport_test.py ########
import os.path
import pyximport
pyximport.install(pyximport=False, pyimport=True,
build_dir=os.path.join(os.path.dirname(__file__), "TEST_TMP"))
def test():
import mymodule
assert mymodule.test_string == "TEST"
assert not mymodule.__file__.rstrip('oc').endswith('.py'), mymodule.__file__
######## mymodule.py ########
test_string = "TEST"
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