classification
Title: Python 2.7 setup.py incorrectly double-joins SDKROOT
Type: compile error Stage: patch review
Components: Build Versions: Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: mistydemeo, ned.deily
Priority: normal Keywords: patch

Created on 2019-06-14 18:29 by mistydemeo, last changed 2019-06-14 20:48 by ned.deily.

Pull Requests
URL Status Linked Edit
PR 14095 open mistydemeo, 2019-06-14 18:30
Messages (1)
msg345626 - (view) Author: Misty De Méo (mistydemeo) * Date: 2019-06-14 18:29
Python 2.7's setup.py has incorrect behaviour when adding the SDKROOT to the beginning of the include path while searching.

When searching paths, find_file first checks is_macosx_sdk_path  to see if it needs to add the sdk_root: https://github.com/python/cpython/blob/2.7/setup.py#L87-L88

This is mostly correct, except one of the path prefixes it checks is /Library: https://github.com/python/cpython/blob/2.7/setup.py#L64

The Xcode CLT path is located in /Library, so this check passes. That means the /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk portion of the path gets repeated, leading to an invalid path.

I recognize Python 2.7 isn't in active development, but I have a minimal patch to fix this that I will be submitting.
History
Date User Action Args
2019-06-14 20:48:26ned.deilysetassignee: ned.deily

nosy: + ned.deily
2019-06-14 18:30:43mistydemeosetkeywords: + patch
stage: patch review
pull_requests: + pull_request13949
2019-06-14 18:29:57mistydemeocreate