I have a python package that I create with distutils and I use the version argument in my setup, for example (with other arguments besides the name and version):
setup(name='example_module', version='0.1.2', ...)
I can extract the version number from the module in the example_module package by calling:
import pkg_resources version = pkg_resources.require('example_module')[0].version
How do I access this version number from a python script that is outside of this distribution?
source share