Skip to content

gh-119696: Support relocatable macOS framework installations - #51

Draft
zaniebot wants to merge 1 commit into
zb/relocatable-flag-ii-cifrom
zb/relocatable-flag-ii-framework
Draft

zaniebot wants to merge 1 commit into
zb/relocatable-flag-ii-cifrom
zb/relocatable-flag-ii-framework

Conversation

@zaniebot

@zaniebot zaniebot commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

macOS framework builds embed an absolute framework install name, so the command wrapper and internal Python.app cannot find the framework after it moves. Give the installed framework an @rpath identity that includes its name and version, and link the wrapper, app interpreter, and standard-library extensions with paths relative to their installed locations. Build-tree binaries continue to use their build-time library search.

This extends the experimental mode in python#119696 to framework installations, beyond PBS's non-framework build layout. The request for PBS framework distributions is tracked separately in astral-sh/python-build-standalone#274. Framework-specific fixtures use the internal app interpreter, and stack-frame classification identifies the loaded Python image so custom framework names work.

Copied virtual environments link to the directory containing the base framework so the same install name resolves there. The experimental mode moves the framework as a unit, including its internal Resources/Python.app. External command symlinks and application launchers are not rewritten and may need updating. Dependency bundling, data-file relocation, and rewriting script shebangs or sysconfig paths remain separate concerns.

Stacked on #50. The independent custom-framework remote-inspection defect is addressed in #52.

@zaniebot
zaniebot force-pushed the zb/relocatable-flag-ii-framework branch from e0a5cbd to 2f9a2f9 Compare October 22, 2026 19:04
@zaniebot
zaniebot force-pushed the zb/relocatable-flag-ii-framework branch from 2f9a2f9 to ef2e4c2 Compare October 22, 2026 19:30
@zaniebot
zaniebot force-pushed the zb/relocatable-flag-ii-framework branch 2 times, most recently from 0caa017 to bf99fde Compare October 22, 2026 21:13
@zaniebot
zaniebot force-pushed the zb/relocatable-flag-ii-framework branch from bf99fde to c9d57d8 Compare October 22, 2026 22:19
@zaniebot
zaniebot force-pushed the zb/relocatable-flag-ii-framework branch from c9d57d8 to 4ad6755 Compare October 22, 2026 22:52
@zanieb
zanieb added this pull request to stack #57 October 22, 2026 22:53
@zaniebot
zaniebot removed this pull request from stack #57 October 22, 2026 22:59
@zaniebot
zaniebot added this pull request to stack #58 October 22, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant