mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-25 01:48:22 -04:00
12 lines
230 B
Python
12 lines
230 B
Python
from enum import IntEnum
|
|
from semver import Version
|
|
|
|
|
|
class VerComp(IntEnum):
|
|
RIGHT_NEWER = -1
|
|
EQUAL = 0
|
|
RIGHT_OLDER = 1
|
|
|
|
|
|
def semver_compare(a: str, b: str) -> VerComp:
|
|
return VerComp(Version.parse(a).compare(b))
|