[Distutils] Way to ask distutils what version of a package is installed?

Tarek Ziadé ziade.tarek at gmail.com
Sat Jan 10 18:50:35 CET 2009


On Sat, Jan 10, 2009 at 6:21 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
>
> A simpler API that pkg_resources's one, something like:
>
>>>> from distutils import get_package_version
>>>> get_package_version('SomePackage')
>

A generic API could be ;

>>> from distutils import get_metadata
>>> get_metadata('SomePackage')
{'Name' : 'SomePackage', 'Version': 'xxx', ...}

Regards
Tarek


More information about the Distutils-SIG mailing list