Skip to content

Commit bd9e01e

Browse files
committed
setup.py: avoid joining the sdkroot twice
1 parent 2b57847 commit bd9e01e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ def macosx_sdk_root():
5555
sysroot = m.group(1)
5656
return sysroot
5757

58-
def is_macosx_sdk_path(path):
58+
def is_macosx_sdk_path(path, sysroot=macosx_sdk_root()):
5959
"""
6060
Returns True if 'path' can be located in an OSX SDK
6161
"""
6262
return ( (path.startswith('/usr/') and not path.startswith('/usr/local'))
6363
or path.startswith('/System/')
64-
or path.startswith('/Library/') )
64+
or (path.startswith('/Library/') and not path.startswith(sysroot)) )
6565

6666
def find_file(filename, std_dirs, paths):
6767
"""Searches for the directory where a given file is located,

0 commit comments

Comments
 (0)