summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/__init__.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/leap/bitmask/__init__.py b/src/leap/bitmask/__init__.py
index 6fd6174..48490a0 100644
--- a/src/leap/bitmask/__init__.py
+++ b/src/leap/bitmask/__init__.py
@@ -1,5 +1,7 @@
+import os
import sys
import pkg_resources
+from .util import here
from ._version import get_versions
if not getattr(sys, 'frozen', False):
@@ -10,5 +12,12 @@ if not getattr(sys, 'frozen', False):
# 'pip install -e .' and 'pip install leap.common'
pkg_resources.get_distribution('leap.bitmask')
-__version__ = get_versions()['version']
-del get_versions
+ __version__ = get_versions()['version']
+ del get_versions
+
+else:
+ try:
+ __version__ = open(os.path.join(
+ here(), 'version')).read().strip()
+ except Exception:
+ __version__ = '0+0xacab-unknown'