6

I struggle to understand why python has names likes .egg or .wheel (or cheeseshop) when installing packages.

Is there any explanation for the use of the terminology eggs or wheels? What do they refer to? What is the underlying image? The metaphor? I just fail to see what the metaphor is.

Note: I am asking about naming, not 'what is an egg?'.

Private
  • 2,626
  • 1
  • 22
  • 39
  • Your question is good but I am afraid it's not good enough for this forum as it don't relate to any coding problem. It would be better if you ask the same on SuperUser may be. – Abhineet Jan 10 '17 at 07:30
  • 2
    @Abhineet thanks. I think naming and terminology are coding problems that have specific answers, so I am hoping someone will want to answer it. – Private Jan 10 '17 at 07:31
  • Hope for best. Prepare for worst :) – Abhineet Jan 10 '17 at 07:44
  • 6
    It is always Monty Python. For details about eggs and wheel in particular have a look at http://stackoverflow.com/questions/21113163/wheel-is-a-reference-to-the-other-python – Robert Jørgensgaard Engdahl Jan 10 '17 at 07:45
  • 1
    As mentioned in a comment farther down the page @Robert linked, the ["Cheese Shop" sketch](https://en.wikipedia.org/wiki/Cheese_Shop_sketch) is one of Monty Python's better-known bits, in part because it's easy to parody. – Kevin J. Chase Jan 10 '17 at 07:52
  • For those who do not know Monty Python and think the Cheese Shop sketch is as funny as knife and fork, would anyone want to explain the basics? – Private Jan 11 '17 at 10:57
  • The majority of the "Cheese Shop" sketch is quoted in the Wikipedia article I linked to. A [Google video search for "Cheese Shop"](https://encrypted.google.com/search?q="Cheese+Shop"&tbm=vid) (without even mentioning "Monty" or "Python") turns up the entire sketch in results 1, 2, 3, 4, 5, _and_ 6. What more do you want? – Kevin J. Chase Jan 11 '17 at 23:15
  • @KevinJ.Chase Sorry, I was not asking what the sketch is about. The metaphor of the sketch does not work: it does not have cheese, and pypi is filled with it. – Private Jan 12 '17 at 10:39

1 Answers1

5

Eggs and Wheels

Eggs are what live pythons-the-snakes hatch from --- they are "containers for python(s)".

As for wheels, "PEP 427 -- The Wheel Binary Package Format 1.0", section "Comparison to .egg" explains:

  1. Wheel is a reference to the other Python.

...meaning Pythons-the-comedians.

Martijn Pieters commented on an answer to a related question, pointing to the tongue-in-cheek wheel slogans (emphasis mine):

Wheel...

  • Because 'newegg' was taken.
  • Python packaging - reinvented.
  • A container for cheese.
  • It makes it easier to roll out software.

This leads directly to...

The Cheese Shop

The Cheese Shop itself explains its name:

Trivia

The secret code name refers to the Cheese Shop sketch performed and recorded by John Cleese and Micheal Palin on 7 January 1972.

If you are really curious then view the sketch on YouTube.

Whether that name was chosen because CPAN [contained] so many packages at that time remains in the dark zone of rumours and wild speculation.

The last point suggests the answer to your follow-up comment, "The metaphor of the sketch does not work: it does not have cheese, and pypi is filled with it." When it was created in 2002, the Cheese Shop would have only hosted a small fraction of the total Python packages available. This is suggested strongly by their comparison to PERL's Comprehensive PERL Archive Network (CPAN).

They also, intentionally or not, predicted experiences like trying to find the yaml package in the obvious place --- https://pypi.python.org/pypi/yaml --- when it is actually hiding at https://pypi.python.org/pypi/PyYAML.

Finally, in an even more direct parallel with the sketch, registering a package with the Cheese Shop does not require actually uploading anything to the Cheese Shop. From the distutils upload docs, version 3.1 (emphasis mine):

The Python Package Index (PyPI) not only stores the package info, but also the package data if the author of the package wishes to.

Since a package owner can choose to host the package files elsewhere, and since that "elsewhere" might cease to exist for any number of reasons, PyPI can quite literally offer a package it cannot provide.

Kevin J. Chase
  • 3,856
  • 4
  • 21
  • 43
  • That is a helpful answer. Just so I get it right: wheels as containers for cheese are referring to the round shape of many cheese? I am not sure I understand the link between wheels and cheese. Sorry if you feel I insist. – Private Jan 12 '17 at 14:15
  • @Private: Cheese is often packaged and shipped in [huge cylinders, called "wheels"](https://encrypted.google.com/search?q="wheel+of+cheese"+"cheese+wheel"&tbm=isch). – Kevin J. Chase Jan 12 '17 at 14:43