[Distutils] setuptools for people behind a firewall

Phillip J. Eby pje at telecommunity.com
Tue Jul 12 05:09:27 CEST 2005

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:


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

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.)

More information about the Distutils-SIG mailing list