provide a way to get Distribute version programmatically
It doesn't seem like there's a way to get the version of Distribute programmatically. This is useful for diagnostic purposes (e.g. for printing the version of Distribute being used in log messages). For example, using version 0.6.34:
>>> import setuptools >>> setuptools <module 'setuptools' from '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/__init__.pyc'> >>> setuptools.__version__ '0.6'
I understand that there are probably reasons for having
__version__ return 0.6. But a different attribute could be exposed for the Distribute version.
The only way I found to get the version was from the command-line running:
$ pip freeze