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? Andreas
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.
Andreas Jung wrote:
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?
I'm also interested in a response to this, particularly if it is better than what we already do at Enthought. :-) We basically unpack the EGG-INFO/PKG-INFO and EGG-INFO/requires.txt from the egg (you don't need to unpack the whole thing), concatenate those files into a single file, and then put that file up in our egg repository to ensure that tools browsing the repo don't have to download and unpack an egg in order to figure out what the egg is and what its dependencies are. Of course, we hadn't been trying to be a PyPi, but simply a web-accessible directory that stores eggs. -- Dave
participants (3)
-
Andreas Jung
-
Dave Peterson
-
Phillip J. Eby