Repository navigation
fix: recognize Homebrew Cellar framework prefixes - #612
Merged
gaborbernat merged 5 commits intoOct 8, 2026
Merged
gaborbernat merged 5 commits into
gaborbernat merged 5 commits into
Conversation
sricharanreddycheruku
requested review from
gaborbernat and
ofek
as code owners
October 8, 2026 04:55
Keep the comment on why the matcher reads sys.base_prefix, and name both cases that leave the Cellar keg path, -S and PYTHONHOME, as checked against Homebrew's [email protected], 3.13 and 3.14 sitecustomize. Number the changelog fragment and link its API references.
gaborbernat
enabled auto-merge (squash)
October 8, 2026 05:50
The python-freethreading formula builds PythonT.framework instead of Python.framework, so neither its opt link nor its Cellar keg matched and macOS site directories skipped the Homebrew prefix for it.
Homebrew names each keg directory by its version and its sitecustomize recognizes it with [0-9._abrc]+, and no Python formula declares a head build. Use the same charset so a non-Homebrew path such as Cellar/python/latest no longer counts as Homebrew.
gaborbernat
force-pushed
the
agent2-homebrew-cellar-prefix
branch
from
October 8, 2026 07:14
b8e2611 to
80c33c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Homebrew's Python -S keeps a Cellar framework prefix because sitecustomize is skipped. The opt-only matcher then returns system shared directories. Recognize both layouts and extend the existing directory tests.
Source: https://github.com/Homebrew/homebrew-core/blob/48016074c89f8891bba84e868d156000cebd613d/Formula/p/[email protected]#L511
Validation on Linux: before, 48 Cellar cases failed and 48 opt controls passed; after, 403 macOS-module tests passed with patched prefixes. Tox Python 3.10/3.12/3.13/3.14: each 2061 passed, 125 skipped; final fixture refactor rechecked on 3.12. Changed-line coverage 100%; docs, types, package, hooks and news checks passed. Native macOS was not run.
Includes a news fragment; its filename will be updated to the PR number.