setup.py: fix dirty versions (#86510)
This commit is contained in:
parent
bcbb9344f7
commit
6c703b545c
2
setup.py
2
setup.py
|
@ -42,7 +42,7 @@ def get_version():
|
|||
real_number, commit_count, commit_hash = result.split('-', 2)
|
||||
version = '%s.post%s+%s' % (real_number, commit_count, commit_hash)
|
||||
else:
|
||||
version = result
|
||||
version = result.replace('.dirty', '+dirty')
|
||||
return version
|
||||
else:
|
||||
return '0.0.post%s' % len(subprocess.check_output(['git', 'rev-list', 'HEAD']).splitlines())
|
||||
|
|
Loading…
Reference in New Issue