Kevin Teague wrote:

On Jun 30, 2009, at 4:46 PM, Tarek Ziadé wrote:

On Tue, Jun 30, 2009 at 10:06 PM, Scott David
Daniels<scott.dani...@acm.org> wrote:
Tarek Ziadé wrote:

On Tue, Jun 30, 2009 at 8:37 PM, Paul Moore<p.f.mo...@gmail.com> wrote:

[1] I'd actually like it if the PEP defined an uninstall command -
something like "python -m distutils.uninstall packagename". It can be
as minimalist as you like, but I'd like to see it present.

it's already there:

http://www.python.org/dev/peps/pep-0376/#adding-an-uninstall-function

That (at least as I read it) is a function, not a command.
If it is a command, give an example of its use from the command line
for us poor "don't want to research" people.  If the following works:

   $ python setup.py uninstall some_package

Then explicitly say so for us poor schlubs.


Right, I'll add that. Although it will be a reference implementation only.


Uninstall as a command feels a little weird. Since "python setup.py [some-command]" implies that the setup.py contains information about the distribution that the command is being applied to. So instead of:

$ python setup.py uninstall some_package

It could be:

   $ python -m distutils uninstall some_package

Asymmetrical with the install of course.

Michael


It could just be:

$ python setup.py uninstall

Except then you'd need to have a complete distribution kicking around with which to run the "python setup.py uninstall" command just to tell the uninstall command the distribution name you want to uninstall. But then with the other uninstall format you could uninstall any distribution from within any other distribution, which is convenient, but weird ... e.g.:

$ cd Spam-1.0/
$ python setup.py uninstall Foo

Although even the other version of the command could do weird stuff:

$ cd Spam-1.0/
$ python setup.py install
$ cd ../Spam-2.0/
$ python setup.py uninstall

Which would presumably remove the Spam 1.0 distribution when run from the 2.0 version of it! Or perhaps this command should only allow uninstall to be run from a distribution whose name and version match the one that it was installed from ...

I dunno what the right solution is. My two-cents is either to punt and only include an uninstall function as currently proposed, or for only supporting some form of the "python setup.py uninstall" style since I would guess that the most common use-case for uninstall is: user downloads a distribution, runs "python setup.py install", tries out the package, decides they don't like package, then runs "python setup.py uninstall" to restore their python back to it's original state. For doing anything more complex than that, people should be encouraged to use another one of the existing tools for managing their distributions, IMHO.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


--
http://www.ironpythoninaction.com/

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to