HeadlinesBriefing favicon HeadlinesBriefing.com

Portable Python Builds

Hacker News •
×

The python-build-standalone project creates self-contained, highly-portable Python distributions. These distributions offer a full-featured Python installation with most standard library extension modules included. Library dependencies are either bundled or statically linked, minimizing run-time dependencies by limiting CPU instruction sets and shared libraries. The aim is for these distributions to function on any system for the targeted architecture.

Some distributions include build artifacts and metadata, allowing downstream users to reassemble custom Python versions, potentially excluding features like SQLite and OpenSSL. This is particularly useful for embedding Python within larger binaries. The sister project, Py Oxidizer, is a downstream repackager that enhances these distributions with Rust code, offering single-file executable Python interpreters.

Key considerations for users include runtime requirements, obtaining and extracting distributions, and specific behaviors on different operating systems. The project aims for broad compatibility and provides documentation on build artifacts, licensing, and technical notes. Py Oxidizer is often recommended for users seeking enhanced functionality or single-file executables.