diff --git a/modepy/version.py b/modepy/version.py index 006c4a5..e7d6757 100644 --- a/modepy/version.py +++ b/modepy/version.py @@ -1,2 +1,9 @@ -VERSION = (2024, 1) -VERSION_TEXT = ".".join(str(i) for i in VERSION) +import re +from importlib import metadata + + +VERSION_TEXT = metadata.version("modepy") +_match = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT) +assert _match is not None +VERSION_STATUS = _match.group(2) +VERSION = tuple(int(nr) for nr in _match.group(1).split("."))