[Distutils] pkg_resources: parsing requires.txt without .egg-info/ directory

Sridhar Ratnakumar sridharr at activestate.com
Wed Jul 22 04:19:03 CEST 2009


On Tue, 21 Jul 2009 18:04:00 -0700, P.J. Eby <pje at telecommunity.com> wrote:

> Is there anyway to get access to this parsed _dep_map without having a
> reference to the .egg-info directory? After all, everything needed to
> parse requires.txt is that file alone.
>  Note: requires.txt is extracted and stored elsewhere, so I cannot rely  
> in
> it being inside .egg-info/ directory in order to parse it.
>  print require('zope.component')[0]._dep_map would be the normal way to  
> get it, for a package that's already installed.
>  However, from some of the rest of what you're saying, it sounds like  
> you're trying to parse this for an un-built package.  Is that the case?

Yes. I am not bothered about installed packages. Long story short, I  
download packages from PyPI .. extract the PKG-INFO and requires.txt file  
for each of them. Then, I am trying to parse requires.txt (copied from the  
tarball).

-srid




More information about the Distutils-SIG mailing list