[Distutils] pip vs easy_install vs distutils2

Carl Meyer carl at oddbird.net
Sun May 30 19:13:48 CEST 2010


Lennart Regebro wrote:
> 1. We include easy_install or pip in stdlib. However, I think we
> shouldn't include any installer in stdlib, until it has evolved into a
> proper package handling utility which also can uninstall, etc.

You are aware that pip uninstalls? It also queries PyPI, lists locally
installed packages, etc. It at least has a start on most of the things
one would want a "proper package handling utility" to do.

> 4. Write a proper installer/uninstaller and include that in stdlib. I
> suggest that it's call "pypi" and have commands like
> download/install/uninstall/upgrade. I'm not sure how much it needs to
> be based on/integrated with distutils2, as I don't know what the plans
> are for uninstaller support. Other than that it would pretty much only
> need to know how to download and run setup.py on packages, so I'm not
> sure it needs to be powered by distutils2 in any deeper sense. :-)

This sounds like a pip clone. Pip's installation "interface" is nothing
more than "setup.py install" in a subshell, so distutils2 support for
installation will likely be quite simple. Replacing pip's use of
pkg_resources with distutils2's pkgutil for querying local package info
will be a bit more work, but the APIs are pretty similar.

The question about a hypothetical "distutils2 installer" is backwards
compatibility. If it is not backwards-compatible with existing
distutils/setuptools packages, it will be useless to most people (there
will be legacy packages hanging around, ones that people depend on, for
many years to come). If it is backwards-compatible with existing
packages, then it is a reimplementation of pip.

I sympathize with the ease-of-use reasons for having something in the
stdlib. And I'm not sure putting pip in the stdlib would be good for
pip's development. So I don't have a solution to propose. But I have a
hard time believing that reimplementing pip is even under serious
consideration. It smells of seriously underestimating the amount of work
involved.

Carl


More information about the Distutils-SIG mailing list