[Distutils] SETUPTOOLS - Loading Eggs which do not have an egg_info

Ilias Lazaridis ilias at lazaridis.com
Fri Dec 8 12:42:53 CET 2006


Phillip J. Eby wrote:
> At 08:57 PM 12/7/2006 +0200, Ilias Lazaridis wrote:
>>          ep_map = pkg_resources.EntryPoint.parse_map(dist.entry_points,
>> dist)

> By the way, I missed this line in your email before: you should *not* pass 
> dist as the second argument here.  That method is looking for a 
> pkg_resources.Distribution, not a distutils.Distribution.

ok, this one works now (btw: either with "dist" or without it. but i've 
removed it, as you've suggested).

> distutils.Distribution (and setuptools.dist.Distribution) represent 
> *source* distributions that have not been built yet.  

ok

> pkg_resources.Distribution objects represent *built* and *importable* 
> distributions.  They have different data structures and 
> behaviors.  distutils Distribution objects have data and methods for 
> running commands and building, while pkg_resources.Distribution objects 
> know about import locations, entry points, package versions, and things 
> like that.   You can't pass a distutils Distribution into *any* 
> pkg_resources APIs, or vice versa -- they are utterly incompatible objects.

I have missed the existence of "pkg_resources.Distribution" totally (was
looking on "setuptools.dist.Distribution / disutils.Distribution" )

are "pkg_resources.Distribution" objects finally the internal
representation of eggs?

.

-- 
http://lazaridis.com



More information about the Distutils-SIG mailing list