Distributing Python programs through PyInstaller
summary
PyInstaller packages Python apps by collecting all .py, C extensions and data into either a one-folder layout or a single-file executable: a bootloader binary with a zip archive appended. Shared .so/.dll files get extracted to a temp directory at runtime, UPX compression and Windows CRT bundling are supported, and a generated spec file lists discovered modules, with overrides for hidden imports and special-case recipes (Qt, PIL plugins). Bytecode is bundled (not cryptographically protected); ctypes-based dependencies are detected but fully preventing reverse engineering is not solved.
AI-written summary · about
chapters (26)
- 0:00Introduzione
- 0:49Goal
- 1:31Means
- 2:30Solution
- 3:05Overview
- 5:33Crash tutorial
- 12:00Where is the program?
- 14:17Import hooks
- 17:14And now for something better
- 17:45What is in there?
- 18:10Where are the libraries?
- 20:17Explore the executable
- 21:43Feature reel
- 23:33Multiplatform: Windows
- 25:19Multiplatform: Linux
- 26:50Multiplatform: Mac OS X
- 27:27Flexibility
- 29:19Analysis
- 29:59SPEC file
- 30:27Dependencies: Python level
- 31:49Dependencies: OS level
- 34:40Hidden imports (& datas)
- 36:31SPEC hand editing
- 37:59Reverse engineering
- 40:52Pyinstaller future
- 42:22Questions?
related talks
28mSnakes in a case: Packaging Python apps for distribution
31mPython on Windows
33mThe Evolution of Python Packaging
02h 36mPython Packaging Demystified
36mPython Packaging from Init to Deploy
24mInside the Cheeseshop:How Python Packaging Works
24mA tale of Python C extensions and cross-platform wheels
01h 01mExtend and Embed Python with C++
