[Distutils] pkg_resources: parsing requires.txt without .egg-info/ directory
P.J. Eby
pje at telecommunity.com
Wed Jul 22 21:14:11 CEST 2009
At 12:08 PM 7/22/2009 -0700, Sridhar Ratnakumar wrote:
>On Tue, 21 Jul 2009 21:23:00 -0700, P.J. Eby <pje at telecommunity.com> wrote:
>>If I were trying to do what you're doing, I'd just run a bdist_egg on
>>the package and inspect it via the API. Or, alternately, I'd run the
>>egg_info command with an explicit target directory, then load it via the
>>regular API. (By "regular API" I mean such things as a
>>find_distributions() call aimed at the parent of the .egg-info
>>directory.)
>>
>>And I'd do it that way because then I wouldn't need to care whether the
>>distribution was created with setuptools or not.
>
>How can you run egg_info ('python setup.py egg_info') on a distribution
>that does not use setuptools?
By calling setuptools.sandbox.run_setup() with the appropriate
arguments. (When setuptools is imported, it monkeypatches the
distutils, such that distutils is really setuptools. That's how
easy_install is able to build eggs from packages that don't use setuptools.)
More information about the Distutils-SIG
mailing list