Update to latest oslo-version.

Remove the need for versioninfo file and just use python's PKG-INFO.

Change-Id: I4765141e9bf3fa075dfbbc6a07e495c29e12177b
This commit is contained in:
Monty Taylor
2013-02-04 11:57:45 +11:00
parent ed67c32014
commit d20d9d1ca4
6 changed files with 155 additions and 250 deletions
+2 -19
View File
@@ -23,23 +23,6 @@ except ImportError:
import warnings
warnings.warn("Could not import glanceclient.client", ImportWarning)
import os
import inspect
from glanceclient.openstack.common import version as common_version
def _get_client_version():
"""Read version from versioninfo file."""
mod_abspath = inspect.getabsfile(inspect.currentframe())
client_path = os.path.dirname(mod_abspath)
version_path = os.path.join(client_path, 'versioninfo')
if os.path.exists(version_path):
version = open(version_path).read().strip()
else:
version = "Unknown, couldn't find versioninfo file at %s"\
% version_path
return version
__version__ = _get_client_version()
__version__ = common_version.VersionInfo('python-glanceclient')