[Distutils] [Python-Dev] PEP 365 (Adding the pkg_resources module)

"Martin v. Löwis" martin at v.loewis.de
Thu Mar 20 17:31:50 CET 2008


> I'll note that I use easy_install *only* to work in *non-system*
> locations:  if I want to install Python packages to /usr/lib/python2.x/,
> I use the standard system installer, e.g. 'apt-get install
> python-frobnatz'. 

This is probably not the Windows way of doing things (at least not how
I use Windows). Windows doesn't really have the notion of "system
location" (or multiple levels of them, where \Windows and 
\Windows\system32 is "more system" than \Program Files, say).

Windows users typically view the entire system as "theirs", and
have no concerns at all about putting things into Program Files,
system32, or, for that matter, \python25. In fact, they don't care
or even know where stuff ends up - they expect that the system will
find it, and they expect that they can remove anything they installed
even without known where it is - because there is a standard place
to look for uninstalling things.

Of course, setuptools is not the only piece of software that doesn't
play well, so Windows users collect all kinds of cruft over time.
Eventually, C: will run out of disk space, and they either get a
new machine, or reinstall from scratch.

> I wonder if a GUI for managing the add-ons would fit the bill, as an
> alternative to packaging them as though they were standalone programs?

On Windows, it is fairly easy to have an uninstaller registered. There
are wrappers to managing that (such as MSI), but it's really only a
set of registry keys that needs to get written on installation time,
one of them being the command to run on uninstallation.

Assuming that you uninstall the package before uninstalling Python, that
uninstall program could be a Python script (although using a cmd.exe
batch file would probably be more resilient).

The concern with "you just need to delete the folder" is "how am I
supposed to know that? and can I be really sure?". If you run the
official uninstall procedure, and it messes things up, you can complain
to setuptools, or the package author that uninstallation "doesn't work".

If you delete stuff manually, and you forgot to remove something in
a remote location you didn't even know it existed, you still think
it's your own fault. So people are hesitant to actually execute the
procedure.

Of course, once you *do* provide an entry to "Add/Remove Programs",
uninstalling won't be mere deletion, as mere deletion would still
leave these registry keys behind (although Windows got more resilient
over time to provide cleanup in that case: I believe it offers to
remove the ARP entry if the uninstall program has been removed)


Regards,
Martin


More information about the Distutils-SIG mailing list