Skip to content

fix(studio): keep embedded Python prefix bundle-local - #95

Draft
AgentArcLab wants to merge 2 commits into
mainfrom
codex/studio-python-prefix-fix
Draft

AgentArcLab wants to merge 2 commits into
mainfrom
codex/studio-python-prefix-fix

Conversation

@AgentArcLab

Copy link
Copy Markdown
Contributor

Problem

The first relocatable-runtime fix removed the absolute Mach-O dependency, but Python.org's launcher still read the build host from pyvenv.cfg. On a clean Mac, the final DMG then failed to import encodings; CI runners masked it because their system Python.framework supplied the missing standard library.

Fix

  • Rewrite the runtime pyvenv.cfg to home = . and place a second copy beside libpython at runtime/lib/pyvenv.cfg, where the framework launcher resolves it.
  • Make CI assert sys.prefix and the standard-library path stay inside the app runtime, both before DMG creation and from the mounted final DMG.
  • Require the relocatable prefix config in studio-app-check.

The macOS Release continues to publish only the DMG; no ZIP or stale macOS update manifest is generated.

Validation

  • uv run --no-project --with pytest pytest --confcutdir=tests/packaging -q tests/packaging/test_studio_dmg.py (4 passed)
  • sh -n scripts/package_studio_app.sh
  • Local reproduction: adding runtime/lib/pyvenv.cfg with home = . makes the existing bad Artifact resolve sys.prefix and stdlib inside the bundle.

This branch had an error being deployed

1 failed (outdated) deployment
studio-signing — 0328c611 Deployed Sep 20, 2026 by AgentArcLab via build-macos #71
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