Wheels are the new standard of python distribution and are intended to replace eggs. Among other advantages, they offer faster installation and allow secure digital signing. Support is offered in
pip >= 1.4 and
setuptools >= 0.8.
This site shows the top 360 most-downloaded packages on PyPI showing which have been uploaded as wheel archives.
If you have a pure python package that is not using 2to3 for Python 3 support, you've got it easy. Make sure Wheel is installed…
pip install wheel
…and when you'd normally run
python setup.py sdist upload, also run
python setup.py bdist_wheel upload. For a more in-depth explanation, see this guide on sharing your labor of love.
Note: If your project is python 2 and 3 compatible you can create a universal wheel distribution. Create a file called
setup.cfg with the following content and upload your package.
[wheel] universal = 1
Note: this is not the solution for packages that have C extensions or other cases where a platform/architecture independent wheel is impossible. This might mean you are using 2to3 or depend on some other package that is architecture specific. Frankly, I haven't had the time to research this yet. If you know how to do it, please create a ticket so I can replace this paragraph with something useful!
Fantastic, a problem found is a problem fixed. Please create a ticket!
Thanks to the Python 3 Wall of Superpowers for the concept and making their code open source, Donald Stufft for his help on IRC, James Turnbull for the intro copy, and George Hickman for pointing me in the right direction as usual.
订阅 substack 体验古早写作: