Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the metaphors underlying python's packaging vocabulary?

Tags:

python

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?'.

like image 394
Private Avatar asked Jan 10 '17 07:01

Private


1 Answers

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.

like image 154
Kevin J. Chase Avatar answered Nov 02 '22 12:11

Kevin J. Chase