[Distutils] Determining system packages

Rob gentoodev at gmail.com
Fri Apr 13 19:24:16 CEST 2007


Hi,

I'm trying to determine which packages are "system" packages as
opposed to development or regular packages for yolk[1].

An example of what I mean would be wsgiref  which comes included with
Python 2.5.

The closest thing I can find that would help in a pkg_resources
Distribution object is the precedence attribute, but system and
development seem to be the same and the precedence would only help if
there were more than one in the environment.

If I use get_python_lib from distutils.sysconfig and remove the
trailing "site-packages" from the reult and check a distribution's
location attribute to see if its installed there, will it be reliable
or might system packages be in other locations?

Thanks,
Rob

[1] http://tools.assembla.com/yolk


More information about the Distutils-SIG mailing list