setup: mark git snapshots with .post suffix (#12641)

This commit is contained in:
Frédéric Péters 2018-04-30 12:47:39 +02:00
parent 9c486afcc2
commit 2724b9498a
1 changed files with 2 additions and 2 deletions

View File

@ -47,12 +47,12 @@ def get_version():
result = result.decode('ascii').strip()[1:] # strip spaces/newlines and initial v
if '-' in result: # not a tagged version
real_number, commit_count, commit_hash = result.split('-', 2)
version = '%s.dev%s+%s' % (real_number, commit_count, commit_hash)
version = '%s.post%s+%s' % (real_number, commit_count, commit_hash)
else:
version = result
return version
else:
return '0.0.dev%s' % len(
return '0.0.post%s' % len(
subprocess.check_output(
['git', 'rev-list', 'HEAD']).splitlines())
return '0.0'