[Distutils] tracking requested vs dependency installs in PEP 376 metadata

Ronald Oussoren ronaldoussoren at mac.com
Sun Oct 11 21:30:20 CEST 2009


On 11 Oct, 2009, at 20:58, Lennart Regebro wrote:

> 2009/10/11 Ronald Oussoren <ronaldoussoren at mac.com>:
>>>> That is, I install "SuperWebFramework==1.0" which happens to  
>>>> depend on
>>>> peak-rules. I later start using peak-rules in my own simple scripts
>>>> (without
>>>> a setup.py or other explicit dependency information), and yet later
>>>> decide
>>>> to uninstall "SuperWebFramework".  If I understand the proposal  
>>>> correctly
>>>> the uninstallation of "SuperWebFrameWork" would break my scripts.
>>>
>>> Yes of course.
>>
>> IMHO that is a bad experience for the user, because it is very  
>> unintuitive
>> that I have to explicitly install something that's already  
>> installed to
>> ensure that it doesn't go away in the future.
>
> But this is how all installs/uninstalls work and MUST work. If you
> uninstall the software that you use, then you can't use it. It's a
> simple necessity of life.

Sigh.

1) Install TurboGears, this installs simplejson as one of its  
dependencies

2) Notice that simplejson gets installed and is a useful module, then  
use that in your own scripts

3) Uninstall TurboGears

With proposal of tracking which packages are installed as a dependency  
of other packages and automaticly uninstalling them when the package  
that depends on them gets uninstalled step 3 would break my scripts  
unless I explictly tell the installer that I really want to use  
simplejson in step 2.

That's what I meant by "I have to explictly install something that is  
already installed to ensure that it doesn't go away in the future",  
and this is not a useful behaviour.

>
>> This might work in a serious
>> development environment, but can end up to be very annoying and  
>> confusing
>> for casual users.
>
> Can you come up with something better? How will the packaging registry
> know that you want a particular package installed if you don't tell
> it?

The current proposal without tracking if I explicitly installed a  
package works fine and matches how system package managers work.

This does make it harder to uninstall something like TurboGears that  
installs lots of dependencies, but it should be possible to write a  
tool that makes that easier. One way to do this in a GUI-ish manner is  
to have a "show dependencies" checkbox when you uninstall a package,  
this would then show all dependencies and allow easy selection of them  
for deinstallation.

This gets you simular functionality as tracking explictly requested  
installs without needing additional metadata.

Ronald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20091011/015f0a67/attachment-0001.bin>


More information about the Distutils-SIG mailing list