Kaydet (Commit) c3fee694 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix bug 3375 - _multiprocessing.so build problems on OS X.

The solution is to clear sys.path_importer_cache.
üst 67c38e26
...@@ -263,6 +263,12 @@ class PyBuildExt(build_ext): ...@@ -263,6 +263,12 @@ class PyBuildExt(build_ext):
ext_filename = os.path.join( ext_filename = os.path.join(
self.build_lib, self.build_lib,
self.get_ext_filename(self.get_ext_fullname(ext.name))) 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: try:
imp.load_dynamic(ext.name, ext_filename) imp.load_dynamic(ext.name, ext_filename)
except ImportError as why: except ImportError as why:
......
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