One can share Python as a source distribution (.tar.gz
format) or as a built distribution (wheels format).
As I understand it, the point of built distributions is:
However, those two arguments for bdist files seem not to hold for pure-python packages. Still, I see that natsort comes in both, a sdist and a bdist. Is there any advantage of sharing a pure-python package in bdist format?
From pythonwheels.com:
Advantages of wheels
- Faster installation for pure Python and native C extension packages.
- Avoids arbitrary code execution for installation. (Avoids setup.py)
- Installation of a C extension does not require a compiler on Linux, Windows or macOS.
- Allows better caching for testing and continuous integration.
- Creates .pyc files as part of installation to ensure they match the Python interpreter used.
- More consistent installs across platforms and machines.
So for me, I think the first and second points are most meaningful for a pure Python package. It's smaller, faster and also more secure.