[Distutils] pkg_resources.find_distributions("./")

Phillip J. Eby pje at telecommunity.com
Sat Feb 11 02:10:39 CET 2006

At 11:14 PM 2/10/2006 +0100, Elvelind Grandin wrote:
>On 2/10/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> > There is no reliable way to tell what distribution you are in, if all you
> > have is the directory name.  If you have a *module* name, however, you can
> > use get_provider(modulename).get_metadata('PKG-INFO') to retrieve the
> > package's PKG-INFO text, which you can then use to find the distribution
> > name and version.
> >
>The problem is that the package might not be installed. And
>get_provides needs it to be right?

The module just needs to be importable.

More information about the Distutils-SIG mailing list