[Distutils] Obtaining the Egg version from the Python code?

Phillip J. Eby pje at telecommunity.com
Tue Aug 28 17:30:02 CEST 2007


At 03:17 PM 8/28/2007 +0200, Andreas Jung wrote:
>Is there a way to obtain the version info of an egg from with Python code
>stored with the egg?
>
>Usecase: an egg contains several commandline utils (configured and installed
>using entry point). A dedicated --version option should display the overall
>version of the egg.

pkg_resources.require('MyProjectName')[0].version



More information about the Distutils-SIG mailing list