Self-contained highly-portable Python distributions

Hacker News Top Tools

Summary

This project provides self-contained, highly-portable Python distributions with minimal runtime dependencies, useful for embedding Python in larger binaries or running on diverse systems.

No content available
Original Article
View Cached Full Text

Cached at: 07/27/26, 07:46 PM

# Python Standalone Builds — python-build-standalone documentation Source: [https://gregoryszorc.com/docs/python-build-standalone/main/](https://gregoryszorc.com/docs/python-build-standalone/main/) This project produces self\-contained, highly\-portable Python distributions\. These Python distributions contain a fully\-usable, full\-featured Python installation: most extension modules from the Python standard library are present and their library dependencies are either distributed with the distribution or are statically linked\. The Python distributions are built in a manner to minimize run\-time dependencies\. This includes limiting the CPU instructions that can be used and limiting the set of shared libraries required at run\-time\. The goal is for the produced distribution to work on any system for the targeted architecture\. Some distributions ship with their build artifacts \(object files, libraries, etc\) along with rich metadata describing the distribution and how it was assembled\. The build artifacts can be recombined by downstream repackagers to derive a custom Python distribution, possibly without certain features like SQLite and OpenSSL\. This is useful for embedding Python in a larger binary\. See the[PyOxidizer](https://github.com/indygreg/PyOxidizer)sister project for such a downstream repackager\. Many users of these distributions might be better served by the[PyOxy](https://pyoxidizer.readthedocs.io/en/latest/pyoxy.html)sister project\. PyOxy takes these Python distributions and adds some Rust code for enhancing the functionality of the Python interpreter\. The official PyOxy release binaries are single file executables providing a full\-featured Python interpreter\. Contents: - [Running Distributions](https://gregoryszorc.com/docs/python-build-standalone/main/running.html)- [Obtaining Distributions](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions) - [Extracting Distributions](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#extracting-distributions) - [Runtime Requirements](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#runtime-requirements) - [Extra Python Software](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#extra-python-software) - [Licensing](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#licensing) - [Reconsuming Build Artifacts](https://gregoryszorc.com/docs/python-build-standalone/main/running.html#reconsuming-build-artifacts) - [Building](https://gregoryszorc.com/docs/python-build-standalone/main/building.html)- [Linux](https://gregoryszorc.com/docs/python-build-standalone/main/building.html#linux) - [macOS](https://gregoryszorc.com/docs/python-build-standalone/main/building.html#macos) - [Windows](https://gregoryszorc.com/docs/python-build-standalone/main/building.html#windows) - [Behavior Quirks](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html)- [If special keys do not work in the Python REPL](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#if-special-keys-do-not-work-in-the-python-repl) - [No tix on UNIX](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#no-tix-on-unix) - [No`pip\.exe`on Windows](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#no-pip-exe-on-windows) - [Linking Static Library on macOS](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#linking-static-library-on-macos) - [Use of`libedit`on Linux](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#use-of-libedit-on-linux) - [References to Build\-Time Paths](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#references-to-build-time-paths) - [Former quirks](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#former-quirks) - [Technical Notes](https://gregoryszorc.com/docs/python-build-standalone/main/technotes.html)- [How It Works](https://gregoryszorc.com/docs/python-build-standalone/main/technotes.html#how-it-works) - [Setup\.local Hackery](https://gregoryszorc.com/docs/python-build-standalone/main/technotes.html#setup-local-hackery) - [Dependency Notes](https://gregoryszorc.com/docs/python-build-standalone/main/technotes.html#dependency-notes) - [Upgrading CPython](https://gregoryszorc.com/docs/python-build-standalone/main/technotes.html#upgrading-cpython) - [Distribution Archives](https://gregoryszorc.com/docs/python-build-standalone/main/distributions.html)- [Full Archive](https://gregoryszorc.com/docs/python-build-standalone/main/distributions.html#full-archive) - [Install Only Archive](https://gregoryszorc.com/docs/python-build-standalone/main/distributions.html#install-only-archive) - [Project Status](https://gregoryszorc.com/docs/python-build-standalone/main/status.html)- [Target Notes](https://gregoryszorc.com/docs/python-build-standalone/main/status.html#target-notes) - [Test Failures](https://gregoryszorc.com/docs/python-build-standalone/main/status.html#test-failures) - [Test Skips](https://gregoryszorc.com/docs/python-build-standalone/main/status.html#test-skips) ## Indices and tables[¶](https://gregoryszorc.com/docs/python-build-standalone/main/#indices-and-tables) - [Index](https://gregoryszorc.com/docs/python-build-standalone/main/genindex.html) - [Search Page](https://gregoryszorc.com/docs/python-build-standalone/main/search.html)

Similar Articles

What's missing to have reproducible builds on PyPI

Lobsters Hottest

The article explores missing elements in Python packaging specifications for achieving reproducible builds, which would improve supply chain security by enabling independent verification of distributions.

Building the deployment tool I wish I had

Lobsters Hottest

The author details the development of 'Deptool', a custom Python-based deployment and configuration management tool designed to be faster and more predictable than existing solutions like Ansible, driven by a desire for digital sovereignty and better tooling.