[Distutils] setuptools for people behind a firewall

Paul Moore p.f.moore at gmail.com
Tue Jul 12 11:23:47 CEST 2005

On 7/12/05, Phillip J. Eby <pje at telecommunity.com> wrote:
> At 08:54 PM 7/11/2005 +0100, Paul Moore wrote:
> >Ah, there's the difficulty, of course :-) That's where a utility to
> >report the dependencies would help... (It may be pretty trivial, but I
> >don't see immediately how to do this - it seems to me that the current
> >setuptools documentation is more for *creators* of eggs, than for
> >*users* of them...)
> Did you also look at these docs:
> http://peak.telecommunity.com/DevCenter/PythonEggs
> http://peak.telecommunity.com/DevCenter/EasyInstall

I'd forgotten about these, but found them last night. I've not had a
chance to read them through yet, but will do so.

> Of course, the main reason for little documentation devoted to "users" of
> eggs is that really eggs should be a mostly transparent thing.

Hmm, yes. It's that "site-packages should be managed by tools"
attitude of mine which muddies the waters a bit. Maybe it's a Windows

> As for dependency analysis, the current API to find eggs in a directory is
> pkg_resources.find_distributions(dirname_or_filename), which iterates over
> the egg(s), yielding Distribution objects.  Distribution objects have a
> 'depends()' method which returns a list of Requirement objects describing
> what the distribution needs.  With that API, you should easily be able to
> create a simple script to dump an egg's dependencies, although I think the
> API may change slightly in a future release.  (e.g. depends() will probably
> have a different name before 1.0 rolls around.)

Cool. I feel the need for such a script (and possibly some others) so
I'll have a go at an egg_utils script/module which I'll contribute
back when I'm happy with it.


More information about the Distutils-SIG mailing list