Show sha1 for development versions.
This commit is contained in:
parent
92a37c2e4f
commit
c3a727ac7e
7
setup.py
7
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user