Skip to content

Build stdlib dependencies with relocatable.py deps - #40

Open
itamaro wants to merge 1 commit into
python:mainfrom
itamaro:relocatability-deps
Open

itamaro wants to merge 1 commit into
python:mainfrom
itamaro:relocatability-deps

Conversation

@itamaro

@itamaro itamaro commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

On macOS without third-party dependencies installed, CPython omits _ssl, _hashlib, _lzma, _zstd and _decimal, leaving gaps in the relocatability checks.

This adds relocatable.py deps to download, verify and build static OpenSSL, XZ, zstd and mpdecimal libraries, and configure --deps-dir to build CPython against them:

../prebuilt-cpython/relocatable.py deps
../prebuilt-cpython/relocatable.py configure --deps-dir deps

Dependencies are installed under deps/install; already-built versions are reused. The recipes use versions selected by CPython’s macOS and Apple build scripts.

Tested on macOS 14 arm64 against CPython main: all five modules build and link only against libSystem. All stdlib.* checks run, extension coverage increases from 57 to 62 modules, and the existing failures are unchanged.

OpenSSL still embeds paths under deps/install for configuration, certificates and provider modules. Detecting those dependencies after relocation remains follow-up work.

Written with assistance from Claude Opus 5.5.

Without a package manager, macOS has no OpenSSL, XZ, zstd or mpdecimal,
so _ssl, _hashlib, _lzma, _zstd and _decimal aren't built and the checks
that use them are skipped. `relocatable.py deps` downloads those
libraries, checks their SHA-256, and installs static libraries into
deps/install. `relocatable.py configure --deps-dir deps` then builds
CPython against them.

The OpenSSL, XZ and mpdecimal versions and checksums match
Mac/BuildScript/build-installer.py. The zstd version matches
Platforms/Apple, and its checksum is the one published with the release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@itamaro
itamaro force-pushed the relocatability-deps branch from e25fe35 to 982209c Compare October 24, 2026 00:04
@itamaro itamaro changed the title Add a relocatable.py deps subcommand that builds extension module dependencies Build stdlib dependencies with relocatable.py deps Oct 24, 2026
@itamaro
itamaro marked this pull request as ready for review October 24, 2026 00:14
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