summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2008-07-17 16:23:53 (GMT)
committerGuido van Rossum <guido@python.org>2008-07-17 16:23:53 (GMT)
commitc3fee694644cdf24bfb974dcd924fbdf524350ee (patch)
tree749cffd651a40328e825821381c9ba001a2ccbe8 /setup.py
parent67c38e26898571a3255ab773ebca9c94f21d0950 (diff)
downloadcpython-c3fee694644cdf24bfb974dcd924fbdf524350ee.zip
cpython-c3fee694644cdf24bfb974dcd924fbdf524350ee.tar.gz
cpython-c3fee694644cdf24bfb974dcd924fbdf524350ee.tar.bz2
Fix bug 3375 - _multiprocessing.so build problems on OS X.
The solution is to clear sys.path_importer_cache.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 90fe68f..f0fed72 100644
--- a/setup.py
+++ b/setup.py
@@ -263,6 +263,12 @@ class PyBuildExt(build_ext):
ext_filename = os.path.join(
self.build_lib,
self.get_ext_filename(self.get_ext_fullname(ext.name)))
+
+ # If the build directory didn't exist when setup.py was
+ # started, sys.path_importer_cache has a negative result
+ # cached. Clear that cache before trying to import.
+ sys.path_importer_cache.clear()
+
try:
imp.load_dynamic(ext.name, ext_filename)
except ImportError as why: