ref: 79ef3b359300e5e57df1ad4c73359d5135fe85cc
parent: dd3b1d523c8b976bd6b7d827df76c6597f92db47
author: Martin Hermant <martin.hermant@gmail.com>
date: Mon Mar 13 13:48:53 EDT 2017
hide AUBIO_GIT_SHA in release fix py3 syntax error
--- a/python/lib/moresetuptools.py
+++ b/python/lib/moresetuptools.py
@@ -31,12 +31,14 @@
AUBIO_MINOR_VERSION,
AUBIO_PATCH_VERSION]))
- AUBIO_GIT_SHA = get_git_revision_hash()
+
# append sha to version in alpha release
# MAJ.MIN.PATCH.{~git<sha> , ''}
if '~alpha' in AUBIO_VERSION_STATUS :
+ AUBIO_GIT_SHA = get_git_revision_hash()
if AUBIO_GIT_SHA:
AUBIO_VERSION_STATUS = '~git'+AUBIO_GIT_SHA
+
if AUBIO_VERSION_STATUS is not None :
verstr += AUBIO_VERSION_STATUS
return verstr
--- a/wscript
+++ b/wscript
@@ -33,9 +33,8 @@
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
-
return None
-
+
if not which('git'):
print('no git found on this system : can\'t get sha')
return ""
@@ -48,12 +47,12 @@
if short:
gitcmd.append('--short')
gitcmd.append('HEAD')
- return subprocess.check_output(gitcmd).strip()
+ return str(subprocess.check_output(gitcmd).strip())
-AUBIO_GIT_SHA = get_git_revision_hash()
-""" append sha to version in alpha release
-"""
-if '~alpha' in AUBIO_VERSION_STATUS :
+
+# append sha to version in alpha release
+if AUBIO_VERSION_STATUS and '~alpha' in AUBIO_VERSION_STATUS :
+ AUBIO_GIT_SHA = get_git_revision_hash()
if AUBIO_GIT_SHA:
AUBIO_VERSION_STATUS = '~git'+AUBIO_GIT_SHA
@@ -179,7 +178,7 @@
ctx.define('AUBIO_MINOR_VERSION',AUBIO_MINOR_VERSION)
ctx.define('AUBIO_PATCH_VERSION',AUBIO_PATCH_VERSION)
ctx.define('AUBIO_VERSION_STATUS',AUBIO_VERSION_STATUS)
- ctx.define('AUBIO_GIT_SHA',AUBIO_GIT_SHA)
+ # ctx.define('AUBIO_GIT_SHA',AUBIO_GIT_SHA)
if ctx.options.build_type == "debug":
ctx.define('DEBUG', 1)
else: