The bug tracker for setuptools 0.7 or higher is on BitBucket

 

Issue21

Title [PATCH] adding uninstall feature to easy_install
Priority feature Status chatting
Superseder Nosy List ccasey, cdavid, dmartin, glyph
Assigned To ccasey Keywords

Created on 2008-06-03.20:15:50 by ccasey, last changed 2009-04-03.19:13:57 by glyph.

Files
File name Uploaded Type Edit Remove
easy_install.patch dmartin, 2008-06-16.17:37:23 text/plain
Messages
msg262 (view) Author: glyph Date: 2009-04-03.19:13:57
ccasey, can you please update the patch to make it less dangerous, as cdavid
suggests?

This feature is really important.  Since you can't install without administrator
access, and you can't trust setuptools or distutils to remove stuff installed
into a shared directory, there's no "good" way to use setuptools without
virtualenv (and even then you need to assume you can blow away the entire
installation directory).
msg183 (view) Author: cdavid Date: 2008-09-25.15:05:16
I think it would be nice to split the distutils/setuptools parts. The problem
with the pure distutils uninstall is how to get the path where the package to
uninstall is.

As it is, the patch it too dangerous, too: it removes directory with rmtree. It
should not do that; instead, it should try to recursively remove the files and
then the directories, only if the directory is empty (with rmdir, not rmtree).
msg52 (view) Author: dmartin Date: 2008-06-16.17:37:23
I added a check to the add_installed_files_log function for when the code is
executed under develop mode (when there won't be an EGG-INFO folder to add
installed files to). Besides that the patch worked well for me. Can someone else
review this that has commit privileges and give some more feedback on whether or
not this is a candidate for approval? This patch seems to have the uninstall
feature worked out well. One of the features I was happy to see implemented was
the check for back-dependencies on the package being removed and the prompt that
appears when dependency is detected.

I removed the old patch and added this fixed one.

Cheers,
David
msg46 (view) Author: ccasey Date: 2008-06-11.15:53:20
Attached is the patch for this issue.

On Tue, Jun 3, 2008 at 3:15 PM, chris <setuptools@bugs.python.org> wrote:
>
> New submission from chris <cdcasey@gmail.com>:
>
> There is currently no uninstall feature in setuptools. Here is a proposed
> implementation:
>
>  * By default, use easy_install's --record option and place the resulting file
> list in the project's EGG-INFO directory, whether the project is zip-safe or
> not. Use the list for determining which files should be uninstalled.
>
>  * Do a back-check of dependencies on all currently installed projects, and warn
> the user how uninstalling a project could affect other projects.
>
>  * Provide option of uninstalling dependencies that are no longer needed by the
> project being uninstalled (or other installed projects).
>
>  * Remove entry from easy_install.pth
>
> ----------
> messages: 38
> nosy: ccasey
> priority: feature
> status: chatting
> title: adding uninstall feature to easy_install
>
> _______________________________________________
> Setuptools tracker <setuptools@bugs.python.org>
> <http://bugs.python.org/setuptools/issue21>
> _______________________________________________
>
msg38 (view) Author: ccasey Date: 2008-06-03.20:15:50
There is currently no uninstall feature in setuptools. Here is a proposed
implementation:

 * By default, use easy_install's --record option and place the resulting file
list in the project's EGG-INFO directory, whether the project is zip-safe or
not. Use the list for determining which files should be uninstalled.

 * Do a back-check of dependencies on all currently installed projects, and warn
the user how uninstalling a project could affect other projects. 

 * Provide option of uninstalling dependencies that are no longer needed by the
project being uninstalled (or other installed projects).

 * Remove entry from easy_install.pth
History
Date User Action Args
2009-04-03 19:13:57glyphsetnosy: + glyph
messages: + msg262
assignedto: ccasey
2008-09-25 15:05:16cdavidsetnosy: + cdavid
messages: + msg183
2008-06-16 17:37:23dmartinsetfiles: + easy_install.patch
nosy: + dmartin
messages: + msg52
2008-06-16 17:29:39dmartinsetfiles: - easy_install.patch
2008-06-16 17:00:57ccaseysettitle: adding uninstall feature to easy_install -> [PATCH] adding uninstall feature to easy_install
2008-06-11 15:53:21ccaseysetfiles: + easy_install.patch
messages: + msg46
2008-06-03 20:15:50ccaseycreate