Message330

Author srid
Recipients pje, srid
Date 2009-07-22.00:06:34
Content
On Mon, 20 Jul 2009 17:20:44 -0700, P.J. Eby <pje@telecommunity.com> wrote:
 
At 01:26 PM 7/20/2009 -0700, Sridhar Ratnakumar wrote:
On Sat, 18 Jul 2009 19:31:36 -0700, P.J. Eby <pje@telecommunity.com> wrote:
 discovery.resources -- basically pkg_resources under a different name
 It may also be worth adding support for parsing the files under .egg-info
- for instance, those 'extras' in requires.txt.
 See the 'requires()' method of Distribution objects:
 http://peak.telecommunity.com/DevCenter/PkgResources#distribution-methods
 
I've already looked into that before (in pkg_resources.py) - unfortunately, 
this does not return all of requires.txt (as Python dict, that is), but only 
*what* you specify in the 'extras' argument (how am I supposed to know the /
possible/ extras sections beforehand?).
 
The closest I've come to is using `split_sections` and `_get_metadata` to 
construct the dict myself. But that is not the ideal way to provide/use an API.
 

PJE: Ah, you didn't say that, you just said "parse".  If you'll file a feature 
request, I'll replace _dep_map with a public attribute for accessing that 
information in a future release.  In the meantime, you're quite safe 
using ._dep_map, since obviously I'm not going to change it out from under 
you.
History
Date User Action Args
2009-07-22 00:06:35sridsetmessageid: <1248221195.67.0.716920644413.issue82@psf.upfronthosting.co.za>
2009-07-22 00:06:35sridsetrecipients: + srid, pje
2009-07-22 00:06:35sridlinkissue82 messages
2009-07-22 00:06:35sridcreate