On Jun 30, 2009, at 4:46 PM, Tarek Ziadé wrote: > On Tue, Jun 30, 2009 at 10:06 PM, Scott David > Daniels<Scott.Daniels at acm.org> wrote: >> Tarek Ziadé wrote: >>> >>> On Tue, Jun 30, 2009 at 8:37 PM, Paul Moore<p.f.moore at 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 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4