CPython 3.12.13 checkpoint #
This fixture cross-compiles ordinary static and dynamic AArch64 musl CPython
runtimes and packages their standard library as Binarrow filesystem images. The
generated runtime and image are intentionally kept in the repository's
gitignored .tmp/cpython-3.12.13 directory rather than committed to Git.
Prerequisites:
- Zig 0.16.0
llvm-objcopyfor the dynamic fixture- the repository Rust toolchain
curl,make,tar,unzip,shasum, and a native C compiler
Build the host bootstrap interpreter, target interpreter, and filesystem image:
guest-tests/cpython/build.sh
The download is pinned by SHA-256. Host package discovery is disabled for the
cross build so unavailable target libraries cannot leak in through the host's
pkg-config. Configured dependency-free extension modules are linked into the
static executable.
Run the bounded native regression:
guest-tests/cpython/verify.sh
The verification checks Python 3.12.13, installs a separately packaged
multi-file project and the checksum-pinned official packaging 26.2 wheel over
the standard-library snapshot, imports both filesystem-backed packages, checks
the wheel's retained distribution metadata, prints their deterministic
results, and validates an unhandled exception traceback with guest paths and
exit status 1. package-packaging.sh keeps the wheel, unpacked contents, and
generated image under .tmp. The current interpreter can take several minutes
to complete this regression even when the native runner is built in release
mode.
Build and verify the Phase 7 dynamic-linking checkpoint:
guest-tests/cpython/build-dynamic.sh
guest-tests/cpython/verify-dynamic.sh
The dynamic fixture reuses the pinned source and standard-library image,
builds a shared libpython3.12.so, packages the selected _struct native
extension, and installs the separately built guest musl dynamic linker. The
verification imports _struct through CPython's normal dlopen path and uses
it to encode the integer 42. The guest dynamic linker, not Binarrow, performs
the shared-object search and relocations.
Run the same packaged interpreter and standard-library image in Chromium:
guest-tests/cpython/verify-browser.sh
This opt-in Playwright regression replaces the isolated browser project's
filesystem snapshot with python-lib.bnfs, installs the separately generated
phase5-project.bnfs and packaging-26.2.bnfs overlays, uploads
python.aarch64.elf, and checks the same imports, metadata, output, traceback,
and exit status. It is skipped during the normal browser suite because the
generated CPython artifacts are deliberately not committed. The interpreter
regression currently takes several minutes in Chromium.