We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c2a655 commit 9c1e5dcCopy full SHA for 9c1e5dc
modepy/version.py
@@ -1,2 +1,9 @@
1
-VERSION = (2024, 1)
2
-VERSION_TEXT = ".".join(str(i) for i in VERSION)
+import re
+from importlib import metadata
3
+
4
5
+VERSION_TEXT = metadata.version("modepy")
6
+_match = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT)
7
+assert _match is not None
8
+VERSION_STATUS = _match.group(2)
9
+VERSION = tuple(int(nr) for nr in _match.group(1).split("."))
0 commit comments