Wheels – the new eggs
For pure Python packages, the sdist
(source distribution) command has always been enough. For C/C++ packages however, it is usually not that convenient. The problem with C/C++ packages is that compilation is needed unless you use a binary package. Traditionally those were generally the .egg
files but they never really solved the issue quite right. That is why the wheel
format has been introduced (PEP 0427), a binary package format that contains both source and binaries and can install on both Windows and OS X without requiring a compiler. As an added bonus, it installs faster for pure Python packages as well.
Implementation is luckily simple. First, install the wheel
package:
# pip install wheel
Now you'll be able to use the bdist_wheel
command to build your packages. The only small gotcha is that by default the packages created by Python 3 will only work on Python 3, so Python 2 installations will fall back to the sdist
file. To fix that, you can add the...