[Distutils] an uninstall option patch

Greg Ward gward@python.net
Tue, 21 Mar 2000 20:50:37 -0500


[oops! meant to send this to the list, not to Bastian personally...
 here 'tis...]

On 19 March 2000, Bastian Kleineidam said:
> I have implemented an uninstall option. If you specify -c or
> --create-uninstall to the install command, an uninstall script named
> <package name>_uninstall.py will be built and it will be installed in 
> install-lib resp. install-platlib. 
> To uninstall your package, execute this script with python.

Hmmm, good idea.  I've idly mused about how to uninstall module
distributions, and this option hadn't occurred to me.  So now I can see
*two* good ways to do uninstallation:

  * keep track of the files installed (eg. using Michael Muller's
    "pkginfo" patch), and have a universal uninstall script that
    digs up the list of files for a particular distribution

  * generate a custom uninstall script for each installed
    module distribution

In terms of correctness -- do we uninstall exactly the right files? --
they're equivalent; you write a list of files to the disk at
installation time and retrieve it later.

For user convenience, I *think* that Bastian's "custom script" approach
would have a slight edge: as long as people know to type (eg.)
"/usr/local/lib/python1.6/site-packages/uninstall_foo", they're fine.
On the other hand, a single global uninstall script could go in a
central location, so just "pymod_uninstall foo" might do the trick.
HmmMMMmm.

Also strikes me that the code might be a tad cleaner for a global
uninstall script: no need to generate Python code, you just need to
generate a list of filenames somewhere in the pkginfo.

Opinions?

        Greg
-- 
Greg Ward - Unix bigot                                  gward@python.net
http://starship.python.net/~gward/
BE ALERT!!!!  (The world needs more lerts ...)