summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-03 02:58:57 (GMT)
committerGitHub <noreply@github.com>2021-05-03 02:58:57 (GMT)
commitd52bbde9421987d216c600557ef5bc931d03efcc (patch)
treee8cedf9aa87e3faf70792e9962d3bbc87fee4403 /setup.py
parentb43cc31a270d0dacbc69e35d6c6fbdb5edd7e711 (diff)
downloadcpython-d52bbde9421987d216c600557ef5bc931d03efcc.zip
cpython-d52bbde9421987d216c600557ef5bc931d03efcc.tar.gz
cpython-d52bbde9421987d216c600557ef5bc931d03efcc.tar.bz2
bpo-41129: Fix check for macOS SDK paths when building Python (GH-25785)
Narrow search to match contents of SDKs, namely only files in ``/System/Library``, ``/System/IOSSupport``, and ``/usr`` other than ``/usr/local``. Previously, anything under ``/System`` was assumed to be in an SDK which causes problems with the new file system layout in 10.15+ where user file systems may appear to be mounted under ``/System``. Paths in ``/Library`` were also incorrectly treated as SDK locations. Co-authored-by: Ned Deily <nad@python.org>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index ca0ed83..3857e68 100644
--- a/setup.py
+++ b/setup.py
@@ -227,11 +227,11 @@ def macosx_sdk_specified():
def is_macosx_sdk_path(path):
"""
- Returns True if 'path' can be located in an OSX SDK
+ Returns True if 'path' can be located in a macOS SDK
"""
return ( (path.startswith('/usr/') and not path.startswith('/usr/local'))
- or path.startswith('/System/')
- or path.startswith('/Library/') )
+ or path.startswith('/System/Library')
+ or path.startswith('/System/iOSSupport') )
def grep_headers_for(function, headers):