Packaging - Wheel vs Egg
Wheel and Egg are both packaging formats that aim to install artifacts without building or compilation
- The Egg format was introduced by setuptools in 2004
- The Wheel format was introduced by PEP 427 in 2012.
- Python eggs are an older distribution format for Python
- An egg file is basically a zip file with a different extension. Python can import directly from an egg.
setuptoolspackage is required
Wheel is the standard.
- Has an official PEP
- is a distribution package: A versioned archive file that contains Python packages, modules, and other resource files that are used to distribute a Release. Egg was a distribution and a runtime instllation format (if left zipped)
- does not include
.pycfiles - if there is no compiled extensions the package can be universal
- Uses a PEP 376 compliant
.dist-infofolder (egg uses
- Has a richer file naming convention to indicate compatiblity with language versions, ABIs (Application Binary Interface) and system architectures
- is versioned
- organised by sysconfig path type - so it is easier to convert to other formats
.egg: The code is unzipped at runtime and cannot be inspected with an IDE