[Distutils] Finding only activated eggs in Environment()
pythonhead at gentoo.org
Tue Nov 22 09:10:14 CET 2005
Phillip J. Eby wrote:
> At 05:27 PM 11/21/2005 -0800, Rob Cakebread wrote:
>> I'm using pkg_resources.Environment() to get a list of all
>> Besides making a list of activated eggs with
>> and comparing it with pkg_resources.Environment, is there
>> a way to check if an individual egg is activated?
> if someDist in working_set:
> # a distribution w/same location/version/pyversion/etc.
> # is in there
> Note that distribution objects are "value" objects in the sense that you
> can have dist1==dist2 be true, and dist1 is dist2 be false. So, even if
> the 'dist' object came from a different source, the 'in' test will still
> return True if the dist refers to the same
Thanks, thats what I needed. I've been working on "yolk" again and
fixed it so it lists all versions of an egg, not just the latest.
(moved from the Peak mailing list)
If anyone is interested, I started a utility to list all eggs, only
activated eggs, or only non-activated eggs with some of the
metadata (version, desc, license etc.)
I just added a -d option so you can list dependencies of an egg.
I'm working on making it show what version of each dependency
is actually installed.
More information about the Distutils-SIG