Expand description
Bundling a pinned CPython 3.12 so an exported game runs on a machine with no Python installed.
Shape follows the “embedded” distribution: the shared library plus a stdlib
zip and nothing else. pite is a native module registered from Rust, so
no site-packages ship. The archive is cached under the toolchain dir
(PITE_TOOLCHAIN_DIR, default ~/.cache/pite/toolchains) and never vendored
in the repo; a checksum mismatch or an offline machine is a loud error, and
--no-bundle-python keeps the older system-Python gate.
Structs§
- Bundle
Spec - One platform’s pinned artifact.
- Staged
Bundle - What an exported directory needs to find the bundled interpreter.
Constants§
- ARCHIVE_
ROOT - Every member path in these archives sits under this directory.
- PINNED_
BUILD - Pinned upstream build: astral-sh/python-build-standalone,
install_only. Checksums come from the release’sSHA256SUMS. - PINNED_
PYTHON
Functions§
- archive_
path - ensure_
archive - Fetch the pinned archive into the toolchain cache and verify it. A cached file is re-verified every time: a bad cache is never trusted.
- launcher_
env - Env the launcher must set for a staged bundle. Proved on Linux and macOS:
the process runs with no Python on
PATH. - pinned
- The pinned artifact for
platform, orNonewhen we do not ship one. - pinned_
platforms - Every platform whose bundle artifact is pinned and checksummed.
- stage
- Extract the shared library, pack the stdlib into a zip, and lay both out
under
dest(<out>/python).site-packagesis deliberately dropped. - toolchain_
dir - Where downloaded toolchains live. Never inside the project or repo.
- verify
- Checksum gate. Never warns, never repairs: a mismatch is fatal.