summaryrefslogtreecommitdiff
path: root/pyximport
diff options
context:
space:
mode:
authorIgor Kaplounenko <igor.kaplounenko@intel.com>2019-04-11 13:17:37 -0700
committerIgor Kaplounenko <igor.kaplounenko@intel.com>2019-04-11 13:17:37 -0700
commit447bf748195561d808d328964f1bb428e4cf92de (patch)
tree7d6ec9d97065a701fcd38878f5602dab6725c7de /pyximport
parentcd2a42e2ce0248f0b251902707aba8b11ef7410d (diff)
downloadcython-447bf748195561d808d328964f1bb428e4cf92de.tar.gz
pyimport=True should work now on darwin without having to pre-import distutils directly or via pyxbuild
Diffstat (limited to 'pyximport')
-rw-r--r--pyximport/pyximport.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pyximport/pyximport.py b/pyximport/pyximport.py
index 5628f301b..9e9b37c6b 100644
--- a/pyximport/pyximport.py
+++ b/pyximport/pyximport.py
@@ -351,6 +351,9 @@ class PyImporter(PyxImporter):
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')
def find_module(self, fullname, package_path=None):
if fullname in sys.modules: