diff options
author | Kali Kaneko <kali@leap.se> | 2016-05-18 12:28:37 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-05-18 12:28:37 -0400 |
commit | 09568a70ef68a4ef121d9e79fdc5366c4297544e (patch) | |
tree | b8d4358f8bf9c65876961676a603f4d42b59cdb7 /common | |
parent | 0673e3e3f70ebd3e0716c48966c5b3b75ed4f952 (diff) | |
parent | 4ca544212c3f5af08fdbad06133b0b443f6dfa02 (diff) |
Merge branch 'debian/experimental' into debian/platform-0.8debian/platform-0.8
Diffstat (limited to 'common')
-rw-r--r-- | common/setup.py | 29 | ||||
-rw-r--r-- | common/src/leap/soledad/common/_version.py | 17 |
2 files changed, 29 insertions, 17 deletions
diff --git a/common/setup.py b/common/setup.py index 8d9c4d6e..c1f4d5ac 100644 --- a/common/setup.py +++ b/common/setup.py @@ -75,14 +75,20 @@ class freeze_debianver(Command): # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. -version_version = '{version}' -full_revisionid = '{full_revisionid}' -""" - templatefun = r""" - -def get_versions(default={}, verbose=False): - return {'version': version_version, - 'full-revisionid': full_revisionid} +import json +import sys + +version_json = ''' +{ + "dirty": false, + "error": null, + "full-revisionid": "FULL_REVISIONID", + "version": "VERSION_STRING" +} +''' # END VERSION_JSON + +def get_versions(): + return json.loads(version_json) """ def initialize_options(self): @@ -97,14 +103,13 @@ def get_versions(default={}, verbose=False): if proceed != "y": print("He. You scared. Aborting.") return - subst_template = self.template.format( - version=VERSION_SHORT, - full_revisionid=VERSION_REVISION) + self.templatefun + subst_template = self.template.replace( + 'VERSION_STRING', VERSION_SHORT).replace( + 'FULL_REVISIONID', VERSION_REVISION) versioneer_cfg = versioneer.get_config_from_root('.') with open(versioneer_cfg.versionfile_source, 'w') as f: f.write(subst_template) - cmdclass = versioneer.get_cmdclass() # diff --git a/common/src/leap/soledad/common/_version.py b/common/src/leap/soledad/common/_version.py index a72d4aa7..ebc8925f 100644 --- a/common/src/leap/soledad/common/_version.py +++ b/common/src/leap/soledad/common/_version.py @@ -5,10 +5,17 @@ # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. -version_version = '0.8.0' -full_revisionid = '259d37b430564c03f27d0835e23769473034df6f' +import json +import sys +version_json = ''' +{ + "dirty": false, + "error": null, + "full-revisionid": "91cbf6c084569a24c4186f3ff745448d3c51756a", + "version": "0.8.0" +} +''' # END VERSION_JSON -def get_versions(default={}, verbose=False): - return {'version': version_version, - 'full-revisionid': full_revisionid} +def get_versions(): + return json.loads(version_json) |