setup.py: fix dirty versions (#86510)

This commit is contained in:
Benjamin Dauvergne 2024-02-07 12:55:05 +01:00
parent bcbb9344f7
commit 6c703b545c
1 changed files with 1 additions and 1 deletions

View File

@ -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())