aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index b2492143..3441ff27 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,12 @@ if version.endswith(('a', 'b', 'rc')):
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:
- version = version + out.decode('utf-8').strip()
+ version += out.decode('utf-8').strip()
+ p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = p.communicate()
+ if out:
+ version += '-' + out.decode('utf-8').strip()
except Exception:
pass