[Distutils] pip vs easy_install vs distutils2

Tarek Ziadé ziade.tarek at gmail.com
Sat May 29 01:13:41 CEST 2010


Distutils2 is going to be added back in Python (hopefully in 3.2) and
without an install script, it's pretty useless as-is.

We've discussed during the summit at Pycon to create some kind of
bootstrap script in Python, to allow people to
set up an installer of their choice, but I think it's a bad idea.

= summary of the summit proposal =


- an "install" script is added in the scripts, for people to install
distributions in Python. Could be called "pyinstall" for example.

- when first used, it would ask the user to choose a third-party
installer (like Pip). Then it would download it and
  install it with a simple "python setup.py install"

- from there, the install script would be linked to that installer.

If I recall it correctly, this feature was proposed to be able to have
a "modern" installer in Python without
including it in the standard library. (so it can have its own shorter
release cycles). The bootstrap story
would just make it easier for people to get an installer, without
having to do extra manual steps.

The problem I have with this approach is that we need to manage
somewhere at PyPI a list of potential installers,
and maybe deal with upgrades and replacements. Plus, I am not sure
that a user will really understand what to
do when he's asked to chose an installer. Sounds like something we
should only ask to power users, and
people that know what they are doing with p7g. So a bootstrap script
is useless for them.

= alternative proposal =

Let's add that script but powered by Distutils2. It could be Pip if
people from this project think it's a good idea and want to merge, or
an easy_install derivation, or a new script from scratch.

IOW: you get an installer for free in the stdlib without having to think.

Now for the problem of the release cycle (e.g. once in the standard
library it has to wait 18 months for a new version),
I propose that Distutils2 allow the usage of a third party installer
through configuration. IOW, Distutils2 would ship with an installer,
but could use through a simple change in distutils.cfg, another one
installed by a third party project that is more recent.

For this to work, we can define an installer standard interface ala
wsgi. Basically, we state that an installer has to implement a simple
function that takes a name of a project to install, and an optional
version predicate:

    def install(name, version=None):   # if version is None, it means
the latest one.

This needs more work, uninstall is missing in that description, and
what about the script options, etc. but you get the idea: make sure
people can use the installer of their choice, if it turns out that the
one provided by Distutils2 is not good enough anymore for any reason.

Any opinion ?


Tarek Ziadé | http://ziade.org

More information about the Distutils-SIG mailing list