Skip to content

Feat: Ship the stdlib in the packaged desktop app - #76

Merged
b-re-w merged 6 commits into
developfrom
work/desktop-stdlib
Oct 3, 2026
Merged

b-re-w merged 6 commits into
developfrom
work/desktop-stdlib

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 3, 2026

Copy link
Copy Markdown
Member

Closes #60

Feature added (SPEC L-9)

  • The plugin copies the staged prefix's stdlib + libpython (no headers, bin, Tcl/Tk, pycache) into Compose Desktop's app resources (prepare*AppResources) as python-multiplatform-home/; switch pythonBindings { packagePythonHome.set(false) }.
  • At startup PackagedPythonHome resolves the home (env PYTHONHOME > -Dpython.multiplatform.home > <compose.application.resources.dir>/python-multiplatform-home) and calls Py_SetPythonHome before Py_Initialize; libpython is loaded from that prefix first.

Defect fixed during verification: the new launch test symlinked the real staged prefix into a scratch dir and deleteRecursively() followed the link and emptied it (159 desktop tests failed); cleanup now deletes without following links.

Verification (coordinator, after merging develop incl. #64/#28, each module separately): plugin 231/0, desktopTest 578/0, ksp artifact 35/0, app 70/0, compose 111/0; androidNative, iosSimulatorArm64, wasmJs, releaseKotlinAndroid compile OK; :sample:createDistributable OK — the .app carries resources/python-multiplatform-home/lib/python3.14/encodings/__init__.py and libpython3.14.dylib. Launched from / with PYTHONHOME unset: INFO: Python initialized successfully! / runtime : 3.14.7.

Known, separate: in the packaged app the sample's proxies step fails (ExceptionInInitializerError, then No module named 'org') — filed separately.

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