setup.py: fix version bug

This commit is contained in:
Christian Zimmermann 2023-02-22 13:21:47 +01:00
parent 9563dfff47
commit b32b01d272

View file

@ -18,7 +18,7 @@ cnorxz_version = subprocess.run([path_to_cnorxz+"/bin/cnorxz-config",'--version'
assert len(git_tags) != 0, "no version tags found"
git_tag = git_tags[-1]
version = git_tag[1:] + 'dev'
git_hash_tag = subprocess.run(['git','rev-parse',git_tag],stdout=subprocess.PIPE).stdout.decode('ascii')[:-1]
git_hash_tag = subprocess.run(['git','rev-list','-n','1',git_tag],stdout=subprocess.PIPE).stdout.decode('ascii')[:-1]
if git_hash_tag == git_hash and expected_cnorxz_version != cnorxz_version:
version = git_tag[1:]