mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix bug 3375 - _multiprocessing.so build problems on OS X.
The solution is to clear sys.path_importer_cache.
This commit is contained in:
parent
67c38e2689
commit
c3fee69464
1 changed files with 6 additions and 0 deletions
6
setup.py
6
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue