Precompiling and deploying Python to any Linux, Mac OS X or FreeBSD system
summary
Packs the Python interpreter, the standard library and about hundreds of python files plus roughly 20 C libraries into a single ELF/Mach-O by concatenating a ZIP and the executable and squeezing it with UPX, producing runnable Linux, Mac OS X and FreeBSD images. External C extensions are unsupported so C extensions don't load at runtime; optional extras like greenlet and certain bundled C modules are built in, OpenSSL is omitted, builds are repeatable and automated but take ~10 minutes per full rebuild.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:58Python in restricted environments
- 4:27Single Python executable
- 8:29Cross-platform challenges
- 12:29Mac OS X and FreeBSD details
- 16:02Compression and bundling
- 20:25Automating builds
- 23:27C extensions limitations
- 27:13Platform-specific patches
- 30:48Deterministic builds
- 33:01Cross-compiling GCC
- 36:51System call issues
- 38:41Static Python future
- 40:09Closing and Q&A
related talks
33mThe Evolution of Python Packaging
01h 01mExtend and Embed Python with C++
24mA tale of Python C extensions and cross-platform wheels
28mSnakes in a case: Packaging Python apps for distribution
32mCovered in Bees! Deploying an app to 6 platforms in 20 minutes
44mDeinventing the Wheel
49mHow to build Python-C++ libraries
40mBuilding a binary extension
