[Distutils] RFC : PEP 376 - egg.info

David Lyon david.lyon at preisshare.net
Thu Apr 30 17:08:26 CEST 2009



On Thu, 30 Apr 2009 16:48:32 +0200, Tarek Ziadé <ziade.tarek at gmail.com>
wrote:

> No, you don't have the exaustive list of the files installed.

My testing indicates that pkg_resources works ok.

>> --code-------
>>
>> import pkg_resources
>>
>> ws = pkg_resources.WorkingSet()
>>
>> for i in ws:
>>    s = str(i)
>>    print s
>>
>> --end code---
> 
> That doesn't give you a list of installed package for your *project*.

I am writing a package manager gui. I don't have a project.

If there are projects or things like that, I tell the user to go
get zc.buildout or pip.

> Remember that a Distutils project (one setup.py file) can install
> several packages in your python, and depending on the way you install(ed)
> it, you might not be abe to get back your packages.

I am driving easy_install..

Seems to work reasonably well in many cases....

> Try it yourself, here's such a package:
> 
> create a dir with a setup.py file :
> 
> """
> from distutils.core import setup
> 
> setup(name='ok', packages=['one', 'two'])
> """
> 
> now create a "one" subdirectory with a __init__ file in it, same for
"two"
> 
> next, run :
> 
> $ python setup.py install
> 
> Now tell me how you know, looking at your Python installation
> (site-packages), that "ok" installed "one" and "two"'... ;)

That isn't a typical use case in my scenario.

A typical user just wants to install package x,y and z from
pypi. They want them to go "into python" and it is as simple
as that. Those packages will probably end up in site-packages
but as likely as not, the user won't care where they go as
long as they are available when they are needed.

When they are finished, or they don't like them.. they want
to deinstall them by clicking the remove button.

In what I am doing, the nested directories would have been
happily removed.

I appreciate your feedback and it is nice discussing these
things with you.

Best Regards

David





More information about the Distutils-SIG mailing list