I'm using Python 2.7 and trying to run
pkg_resources.get_distribution(appname).version
over multiple apps.
I thought I would be able to do this by manipulating sys.path within the program but it doesn't seem to be recognized by pkg_resources; I can only get an app to be recognized when launching the script from the particular 'appname' directory.
I can make this work in a clunky way with two separate programs, one which jumps around in the file hierarchy and then calls the other to actually run the command above. But this seems ridiculous ...
Anybody have insight into this? Is this a bug in pkg_resources or something I'm missing?