summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-06-27 12:37:46 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-06-27 12:37:46 (GMT)
commitdc969e591efa222d5fc29fb9aa39947e2339fa98 (patch)
tree0506ad152a696dbfbeab02244309adb2e4ec872a
parent84594472692ae5bd77dd51a59c5dd55eaa7d50ef (diff)
downloadcpython-dc969e591efa222d5fc29fb9aa39947e2339fa98.zip
cpython-dc969e591efa222d5fc29fb9aa39947e2339fa98.tar.gz
cpython-dc969e591efa222d5fc29fb9aa39947e2339fa98.tar.bz2
Merged revisions 82272 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r82272 | ronald.oussoren | 2010-06-27 14:36:16 +0200 (Sun, 27 Jun 2010) | 8 lines Two small fixes for the support for SDKs on MacOSX: 1) The code that checks if an path should be located in the SDK explicitly excludes /usr/local. This fixes issue9046 2) The SDK variant for filtering "db_dirs_to_check" in setup.py was not doing anything because of a missing assignment. ........
-rw-r--r--Lib/distutils/unixccompiler.py4
-rw-r--r--setup.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 81a7de6..0817908 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -340,7 +340,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)
diff --git a/setup.py b/setup.py
index ab7909e..f97fbea 100644
--- a/setup.py
+++ b/setup.py
@@ -46,7 +46,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,
@@ -862,6 +862,7 @@ class PyBuildExt(build_ext):
else:
if os.path.isdir(dn):
tmp.append(dn)
+ db_dirs_to_check = tmp
db_dirs_to_check = tmp