How to load package version into __version__ variable if you are using pbr?
问题 In order to simplify python packaging I am trying to migrate to use of pbr. Still, I was not able to figure out how to expose the version of the package into __version__ variable. This is quite important because I do have many users of the package that do rely on the existence of the version variable. People should be able to do: import somemodule print(somemodule.__version__) 回答1: I am not sure if that's the best approach but I was able to spot one other packages that is doing something