[Distutils] Egg depency order
Phillip J. Eby
pje at telecommunity.com
Mon Jan 14 15:45:29 CET 2008
At 12:40 PM 1/14/2008 +0200, Iwan Vosloo wrote:
>I need to get a list of eggs in 'dependency' order: a list with eggs
>(Distribution objects?) which is sorted so that earlier entries will
>never depend on entries later in the list. 
>I spotted the _dep_map attribute on Distribution objects and it seems to
>have something like that already.
>Exactly what is in _dep_map? Could I use it to compute what I need?
No. Use the .requires() method of a distribution instead, to get its
immediate requirements, and then you'll need to do your own sort.
Please see http://peak.telecommunity.com/DevCenter/PkgResources for
the full pkg_resources API. There's no need for you to mess with
private attributes for this stuff.
> In fact, this is an intermediary result - I want to compute all the
>entry points of a tree of dependencies in such a way that the entry
>points of eggs deeper in the tree will always be earlier in the list
>than entry points for those shallower in the tree.
More information about the Distutils-SIG