summaryrefslogtreecommitdiff
path: root/common/src/leap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-12-16 13:21:19 -0400
committerKali Kaneko <kali@leap.se>2013-12-16 13:21:19 -0400
commit45241ec8618d24b61b768bc7027473b52945609f (patch)
treea630349bbcab91550d34ce7f85ff4dcaa6102ef1 /common/src/leap
parent3a5f090e79c65c063fbe2428248b34c1f43b914f (diff)
patch the _version file so it reports the running version
until now this was only possible when running python setup.py version from the source tree. now the <module>.__version__ also reports correctly the runnng version
Diffstat (limited to 'common/src/leap')
-rw-r--r--common/src/leap/soledad/common/_version.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/common/src/leap/soledad/common/_version.py b/common/src/leap/soledad/common/_version.py
index 5116b516..7d4262b5 100644
--- a/common/src/leap/soledad/common/_version.py
+++ b/common/src/leap/soledad/common/_version.py
@@ -128,7 +128,16 @@ def versions_from_vcs(tag_prefix, versionfile_source, verbose=False):
for i in range(len(versionfile_source.split("/"))):
root = os.path.dirname(root)
else:
- root = os.path.dirname(here)
+ root = os.path.dirname(
+ os.path.join('..', here))
+
+ ######################################################
+ # XXX patch for our specific configuration with
+ # the three projects leap.soledad.{common, client, server}
+ # inside the same repo.
+ ######################################################
+ root = os.path.dirname(os.path.join('..', root))
+
if not os.path.exists(os.path.join(root, ".git")):
if verbose:
print("no .git in %s" % root)