6

This python wheel website says, only 300 of the top 360 packages use wheel. I further analysed the Python ecosystem and found that about 2961 packages out of top 5000 use wheel, and others don't.

My questions are:

  1. If they don't use wheel, do they use egg?
  2. Why don't they use wheel? Is that just the laziness of authors or something else, which stop them from using wheel.
  3. I also found from this post that wheel stops install time scripts (correct me if I'm wrong here). So, isn't it the case that because of some wheel functionalities, those packages can't use wheel (because they might need some functionalities of setup.py file, during the installation, e.g. install time scripts).
Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
R4444
  • 2,016
  • 2
  • 19
  • 30
  • Down voter please explain? – R4444 May 23 '19 at 20:00
  • 1
    It is usually fruitless to try to address downvoters here - they have long gone. Readers can give you some guesses - in this case the question seems rather opinion based, and so perhaps people feel it is not a good fit for Stack Overflow. There are four close votes too, so this might be put on hold, for the same reason. – halfer May 23 '19 at 20:11
  • 1
    thanks @halfer I'll keep that in mind – R4444 May 23 '19 at 20:12

1 Answers1

4

If they don't use wheel, do they use egg?

They probably don't. Wheels are built distributions, the alternative is to provide a source distribution, so this is likely what these packages are publishing instead (source distributions have filenames that end in .zip or .tar.gz.

Why don't they use wheel? Is that just the laziness of authors or something else, which stop them from using wheel.

Unless the project can be built with pure-Python wheels, building wheels for a certain platform requires access to a similar build environment. It's possible that they either don't have a given build environment, or don't have enough users to justify the extra work. It's also possible that their package is trivial enough that it doesn't make much difference to install from source vs. from a built distribution.

I also found from this post that wheel stops install time scripts (correct me if I'm wrong here).

This is correct: wheels are built for a given platform, and thus don't do anything at install-time other than put the package in the path.

So, isn't it the case that because of some wheel functionalities, those packages can't use wheel (because they might need some functionalities of setup.py file, during the installation, e.g. install time scripts).

Not really, any package that can be installed can produce a wheel. There is the possibility that a given package is doing more than just installing at install-time (e.g., perhaps it is also downloading some large files or something from an external source) but patterns like this are generally discouraged.

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
  • Thanks so much @Dustin – R4444 May 23 '19 at 19:59
  • If a "package is trivial enough that it doesn't make much difference", e.g. *.py, README, setup stuff, no platform dependencies), will Pypi / pip be ok with a wheel only -- `python setup.py bdist_wheel`, no `sdist` ? – denis Feb 23 '20 at 16:40
  • Yes, it's fine as long as it's a pure-python wheel, but it's considered good practice to publish a source distribution as well. There really isn't any reason _not_ to publish a source distribution. – Dustin Ingram Feb 23 '20 at 18:22