diff options
-rw-r--r-- | Lib/distutils/unixccompiler.py | 4 | ||||
-rw-r--r-- | setup.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index f4605f3..bf73416 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -336,7 +336,9 @@ class UnixCCompiler(CCompiler): static = os.path.join(dir, static_f) if sys.platform == 'darwin' and ( - dir.startswith('/System/') or dir.startswith('/usr/')): + dir.startswith('/System/') or ( + dir.startswith('/usr/') and not dir.startswith('/usr/local/'))): + shared = os.path.join(sysroot, dir[1:], shared_f) dylib = os.path.join(sysroot, dir[1:], dylib_f) static = os.path.join(sysroot, dir[1:], static_f) @@ -43,7 +43,7 @@ def is_macosx_sdk_path(path): """ Returns True if 'path' can be located in an OSX SDK """ - return path.startswith('/usr/') or path.startswith('/System/') + return (path.startswith('/usr/') and not path.startswith('/usr/local')) or path.startswith('/System/') def find_file(filename, std_dirs, paths): """Searches for the directory where a given file is located, @@ -868,6 +868,7 @@ class PyBuildExt(build_ext): else: if os.path.isdir(dn): tmp.append(dn) + db_dirs_to_check = tmp db_dirs_to_check = tmp |