diff options
Diffstat (limited to 'swiftclient/__init__.py')
-rw-r--r-- | swiftclient/__init__.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/swiftclient/__init__.py b/swiftclient/__init__.py index cdeb9ef..d839a91 100644 --- a/swiftclient/__init__.py +++ b/swiftclient/__init__.py @@ -3,6 +3,15 @@ OpenStack Swift Python client binding. """ from client import * -from swiftclient import version -__version__ = version.version_info.deferred_version_string() +# At setup.py time, we haven't installed anything yet, so there +# is nothing that is able to set this version property. Squelching +# that exception here should be fine- if there are problems with +# pkg_resources in a real install, that will manifest itself as +# an error still +try: + from swiftclient import version + + __version__ = version.version_info.cached_version_string() +except Exception: + pass |