Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3fee69

Browse files
committed
Fix bug 3375 - _multiprocessing.so build problems on OS X.
The solution is to clear sys.path_importer_cache.
1 parent 67c38e2 commit c3fee69

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ def build_extension(self, ext):
263263
ext_filename = os.path.join(
264264
self.build_lib,
265265
self.get_ext_filename(self.get_ext_fullname(ext.name)))
266+
267+
# If the build directory didn't exist when setup.py was
268+
# started, sys.path_importer_cache has a negative result
269+
# cached. Clear that cache before trying to import.
270+
sys.path_importer_cache.clear()
271+
266272
try:
267273
imp.load_dynamic(ext.name, ext_filename)
268274
except ImportError as why:

0 commit comments

Comments
 (0)