Commit 2dd3c96
committed
darwin: strip embedded Python.app from Python.framework
python-build-standalone bakes a standalone launcher Python.app into
Python.framework/Versions/<ver>/Resources/. Its Mach-O has a hardcoded
load command:
/Users/runner/work/python-build/python-build/darwin/install/macOS/
macosx/python-3.X.Y/Python.framework/Versions/X.Y/Python
— literally the CI runner's build path. DYLD can't resolve it anywhere
else, so any attempt to launch the Python.app fails with "Library
missing". macOS LaunchServices scans nested .app bundles inside a
.app's Contents/Frameworks/ on launch (`flet debug macos`, `flet run`,
or just opening the built .app) and reliably triggers a flood of
"Python quit unexpectedly" crash report dialogs.
The launcher is only useful for standalone interpreter sessions (the
GUI Python.app you launch from /Applications); libdart_bridge dlopens
the framework's main binary directly and ignores it. Strip it after
extraction.
Existing both in 3.12 and 3.14 tarballs from flet-dev/python-build —
the previous serious_python (pub.dev 1.0.x) packaging path apparently
didn't expose it to LaunchServices, which is why it never surfaced
before the dart-bridge rewrite started routing Python.xcframework
through CocoaPods' vendored_frameworks into Contents/Frameworks/.1 parent fdb3bf7 commit 2dd3c96
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| |||
0 commit comments