A talk on Python packaging and PyInstaller given at GRPUG.
Standalone Programsusing PyInstaller@JaceBrowning
View Slide
Outline● State of Python Packaging● Standalone Distribution● PyInstaller Overview● Demonstration● Work Time!
Interpreted Languages 101● Code○ Modules○ Packages● Interpreter○ CPython aka “Python”○ Jython○ IronPython
State of PythonPackaging
The Pieces● setuptools● wheel● twine● pip
Setup Script
Setup Scripthttps://packaging.python.org/distributinghttps://github.com/pypa/sampleproject
Distributions● Built distribution○○● Source distribution○
Upload● Python Package Index○ https://pypi.python.org○ https://pypi.io (“warehouse”)● Upload distributions○○
StandaloneDistribution
So why do it?● Making work tools accessible● Sharing projects with non-programmers● It’s fun!
Interpreter Embedding● py2exe and py2app● cx_Freeze● PyInstaller
Transcompilation● Nuitka
PyInstaller
Getting PyInstaller● http://www.pyinstaller.org● In general:○
Getting PyInstaller● On OS X:○○○○
Getting PyInstaller● On linux:○○○○○○
Quickstart
Specs● Command:○● https://pyinstaller.readthedocs.io/en/stable/spec-files.html
Specs
Options●●
Building● Command:○● https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages
Compression● UPX● 5.8 MB:
Demonstration
Now you try!