From bd9e01e9d34ed3d0484b4b7be39049341f997ed1 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Fri, 14 Jun 2019 11:19:22 -0700 Subject: [PATCH] setup.py: avoid joining the sdkroot twice --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 33cecc6875739c5..8f92a44119f2066 100644 --- a/setup.py +++ b/setup.py @@ -55,13 +55,13 @@ def macosx_sdk_root(): sysroot = m.group(1) return sysroot -def is_macosx_sdk_path(path): +def is_macosx_sdk_path(path, sysroot=macosx_sdk_root()): """ Returns True if 'path' can be located in an OSX SDK """ return ( (path.startswith('/usr/') and not path.startswith('/usr/local')) or path.startswith('/System/') - or path.startswith('/Library/') ) + or (path.startswith('/Library/') and not path.startswith(sysroot)) ) def find_file(filename, std_dirs, paths): """Searches for the directory where a given file is located,