fix: AppImage pydantic-core module missing (closes #13)#14
Conversation
) The bundled pydantic_core .so extension was compiled for one Python minor version but failed on systems running a different version (e.g. built with 3.12 but user has 3.13). - Add _vendor_compat.py bootstrap that detects ABI-incompatible vendored native extensions and removes them at startup so Python falls back to system site-packages - Pin Python 3.12 in CI build workflow via actions/setup-python - Add python3-pydantic to deb/rpm package dependencies - Clean up vendor script (remove __pycache__, trim dist-info) - Ensure PYTHONNOUSERSITE is unset so system packages are reachable - Bump version to 0.8.11 Made-with: Cursor
|
Still broken in the latest version:
|
Summary
Fixes #13 — AppImage fails to start on systems where the Python minor version differs from the one used in CI (e.g. CachyOS with Python 3.13 vs CI-built with 3.12).
Root cause: Vendored
pydantic_corecontains a native.soextension compiled for a specific Python ABI (cpython-312-x86_64-linux-gnu). When the user's Python is a different minor version, the.sodoesn't load and the app crashes withModuleNotFoundError: No module named 'pydantic_core._pydantic_core'.Changes
src/game_setup_hub/_vendor_compat.pysrc/game_setup_hub/api.py_vendor_compatbefore all other importselectron/main.tsPYTHONNOUSERSITEis unset so system packages are reachableelectron/scripts/vendor-python-deps.sh__pycache__and dist-info bloat; log Python version and .so count.github/workflows/build-release.ymlactions/setup-python@v5with Python 3.12 pinnedelectron/package.jsonpython3-pydanticto deb/rpm depends; bump to 0.8.11pyproject.tomlHow it works
_vendor_compat.pychecks each vendored package with native.sofiles.sofilename's ABI tag against the running Python'sSOABIpython-pydantic-corefrom pacman)Made with Cursor