Nobody expects Python packaging!

Jacob Kaplan-Moss

April 13, 2009

Python has one package distribution system: source files and setup.py install.

And easy_install.

Python has two package distribution systems: setup.py install and easy_install. And zc.buildout.

Python has three package distribution systems: setup.py install, easy_install, and zc.buildout. And pip.

Amongst Python’s package distribution are such diverse elements as…

Comments:

Chris McDonough:

Maybe a misleading topic. Maybe it should be "Nobody expects Python package installers!" Each system you note there is capable of installing the same kinds of packages (distutils/setuptools packages). We definitely would be in a pretty bad situation if we had four competing *packaging* formats. But as it stands we only have four competing installers for one packaging format.

Kirill Zabroski:

There should be one -- and preferably only one -- obvious way to do it. (c) PEP20

Kirill Zaborski:

Sorry for bothering but there was misprint in my first 1st post (my surname is Zaborski)

cwillu:

Unfortunately once you're into the realm of deployment, "there is one way to do it" is no longer as useful as a guiding principle. In fact, I would go so far as to say that the principle exists precisely to enable many differing approaches to deployment.

There is one hook into the import system, so that you can deploy a package via an egg, a zip, naked files in the filesystem, a database, etc, and it'll just work. There is one API for randomness, so that you can use your hardware RNG, or your network entropy source, or your scratch file of preloaded randomness for off-line use. And so forth.

cwillu:

Incidentally, clicking the preview link seems to have directly submitted the comment without actually giving the preview.

James Pearson:

I think it's important to note that the Zen says that there should preferably be one *obvious* way to do something, not "there is one true way".

Leave a comment:

Use your real name, or risk deletion.

Optional.

No markup allowed. Linebreaks will be converted; links will be linkified.

Be nice; don't be that guy.