[Distutils] Uninstall command, the return
cgalvan at mail.utexas.edu
Fri Jan 30 04:22:05 CET 2009
Enthought has a package called Enstaller which includes a modified
version of setuptools + an enstaller package that adds some different
functionality. One of the modifications to setuptools adds an uninstall
command which works well with our .egg's. Dealing with eggs allows us
to do some dependency checking to warn the user if the package they are
trying to remove is required by another package.
Another feature we added is similar to the uninstall registry you
mentioned. Whenever someone invokes easy_install and a change is
made(i.e. a package(s) was removed, added, or modified), we create an
entry in a rollback cache file that stores the package-version of
everything installed in site-packages at that time. There is a rollback
menu that displays the changes between the different known rollback
points and you can restore your state to a previous working state in
A lot of this stuff is specific to setuptools/eggs but the fundamentals
of it could be helpful when determining how to implement these kinds of
things into distutils itself, if that is the desired path. Here is the
trunk for Enstaller:
-- Chris Galvan
Tarek Ziadé wrote:
> Many people are asking for an uninstall command. While there are
> possible side-effects when removing all installed files,
> I think it worths it...
> I would like to introduce an uninstall command in distutils, using
> Marc-André Lemburg's mxSetup tool
> (see http://www.egenix.com/products/python/mxBase/) and turning it
> into a uninstall command.
> It's quite straighforward since it uses the install command in dry-run
> mode to get the files to remove.
> It requires of course to keep the source.
> Next, (in a second step) I was wondering if a uninstall registery
> could not be a good thing to have,
> to store a record of the installed files so there's no need to keep
> the source for uninstallation.
> This would required a new command, (and a detailed specification of course)
> There's an open ticket here about that (#4673)
> Any thoughts ?
More information about the Distutils-SIG