_osx_support._default_sysroot is dead in CPython but used downstream with no public replacement
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
_osx_support._default_sysroot(cc) has no caller inside CPython, yet several downstream projects import it directly and there is no public replacement to send them to.
Lifecycle
- GH-23301 (bpo-41116) added it to locate the macOS 11 SDK sysroot when building extensions.
- Its only in-tree caller lived in
distutils. GH-99061 (gh-92584) removeddistutils, so nothing in CPython calls it now.
Downstream use
A GitHub code search finds live callers: pyston (setup.py), PyOxidizer (vendored distutils/unixccompiler.py), and the macports and fink Python patches. They call it to discover the SDK sysroot when compiling extensions.
No public replacement
sysconfig does not expose the SDK sysroot and distutils is gone, so a downstream user has nowhere supported to move. They would shell out to xcrun --show-sdk-path or copy the function body.
Question
For this private helper with live downstream use and no public equivalent, which way do we go:
- Keep it as-is and document that it is unsupported.
- Add a supported public equivalent first, then deprecate and remove.
- Remove it now under the "private API carries no guarantee" rule and accept the breakage.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 _osx_support._default_sysroot(cc) 以及 issue 中提到的下游入口:pyston 的 setup.py、PyOxidizer vendored 的 distutils/unixccompiler.py,以及 macports 和 fink 的补丁。确定采用受支持的替代方案、文档说明还是移除路径更合适;当选定的 policy 和下游迁移路径明确后,工作即告完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- build-system
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100