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

Skip to content

Commit dc969e5

Browse files
Merged revisions 82272 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent 8459447 commit dc969e5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

Lib/distutils/unixccompiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,9 @@ def find_library_file(self, dirs, lib, debug=0):
340340
static = os.path.join(dir, static_f)
341341

342342
if sys.platform == 'darwin' and (
343-
dir.startswith('/System/') or dir.startswith('/usr/')):
343+
dir.startswith('/System/') or (
344+
dir.startswith('/usr/') and not dir.startswith('/usr/local/'))):
345+
344346
shared = os.path.join(sysroot, dir[1:], shared_f)
345347
dylib = os.path.join(sysroot, dir[1:], dylib_f)
346348
static = os.path.join(sysroot, dir[1:], static_f)

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def is_macosx_sdk_path(path):
4646
"""
4747
Returns True if 'path' can be located in an OSX SDK
4848
"""
49-
return path.startswith('/usr/') or path.startswith('/System/')
49+
return (path.startswith('/usr/') and not path.startswith('/usr/local')) or path.startswith('/System/')
5050

5151
def find_file(filename, std_dirs, paths):
5252
"""Searches for the directory where a given file is located,
@@ -862,6 +862,7 @@ class db_found(Exception): pass
862862
else:
863863
if os.path.isdir(dn):
864864
tmp.append(dn)
865+
db_dirs_to_check = tmp
865866

866867
db_dirs_to_check = tmp
867868

0 commit comments

Comments
 (0)