source for python-compatible versioning

This commit is contained in:
Martin Diehl 2021-03-30 17:02:57 +02:00
parent 2e96fcf768
commit d1af4b031a
1 changed files with 1 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import setuptools
from pathlib import Path
import re
# https://www.python.org/dev/peps/pep-0440
with open(Path(__file__).parent/'damask/VERSION') as f:
version = re.sub(r'(-([^-]*)).*$',r'.\2',re.sub(r'^v(\d+\.\d+(\.\d+)?)',r'\1',f.readline().strip()))