summaryrefslogtreecommitdiffstats
path: root/openstack/common/version.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-02-10 04:19:30 -0600
committerMonty Taylor <mordred@inaugust.com>2013-02-10 04:21:24 -0600
commita4b6c313199dbc59e3adfc371d76d2b96df7697c (patch)
tree78e5fdf4215978932c332e837d7c7143da231d53 /openstack/common/version.py
parent8a0cdc5685696a604f7dd0e1ca384d05a52e5889 (diff)
downloadoslo-a4b6c313199dbc59e3adfc371d76d2b96df7697c.tar.gz
oslo-a4b6c313199dbc59e3adfc371d76d2b96df7697c.tar.xz
oslo-a4b6c313199dbc59e3adfc371d76d2b96df7697c.zip
Allow running test in uninstalled source tree.
It was pointed out that we missed the use-case that running tests in a fresh tree checkout should work - and we missed that by reaching too far into the setup module interface. Shame on us. Change-Id: Ic0056a3113b308f063d927484e1e4a44c9316a2d
Diffstat (limited to 'openstack/common/version.py')
-rw-r--r--openstack/common/version.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack/common/version.py b/openstack/common/version.py
index 1a15645..9c9962a 100644
--- a/openstack/common/version.py
+++ b/openstack/common/version.py
@@ -49,11 +49,11 @@ class VersionInfo(object):
provider = pkg_resources.get_provider(requirement)
return provider.version
except pkg_resources.DistributionNotFound:
- # The most likely cause for this is running tests in a tree with
+ # The most likely cause for this is running tests in a tree
# produced from a tarball where the package itself has not been
- # installed into anything. Check for a PKG-INFO file.
+ # installed into anything. Revert to setup-time logic.
from openstack.common import setup
- return setup.get_version_from_pkg_info(self.package)
+ return setup.get_version(self.package)
def release_string(self):
"""Return the full version of the package including suffixes indicating