[Distutils] Introspection on eggs?
Phillip J. Eby
pje at telecommunity.com
Wed Feb 27 20:09:53 CET 2008
At 07:57 PM 2/27/2008 +0100, Andreas Jung wrote:
>Hi,
>
>I am currently working on a small PyPI replacement for hosting local
>and private eggs:
>
><http://pypi.python.org/pypi/haufe.eggserver/0.1.2>
>
>I would like to some introspection on uploaded eggs - basically I am
>interested in the long_description and some other metadata without having to
>unpack the egg and parse it on my own. Is there some API available
>for performing such a task?
You can use dist.get_metadata('PKG-INFO') (where dist is a
Distribution object (egg) obtained via any of the usual pkg_resources
APIs) to obtain the contents of the PKG-INFO file. You would need to
parse it to get the long_description and other stuff out, but it's a
pretty simple format.
More information about the Distutils-SIG
mailing list