At 12:08 PM 7/22/2009 -0700, Sridhar Ratnakumar wrote:
On Tue, 21 Jul 2009 21:23:00 -0700, P.J. Eby <[email protected]> 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.)

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to