from distutils.version import StrictVersion

version = "17.1.3.1"
version_info = tuple([d for d in version.split("-")[0].split(".")])


def compare_version(v1, v2):
    s1 = StrictVersion(v1)
    s2 = StrictVersion(v2)
    if s1 == s2:
        return 0
    elif s1 > s2:
        return -1
    else:
        return 1


def version_lt(v1, v2):
    return compare_version(v1, v2) > 0


def version_gte(v1, v2):
    return not version_lt(v1, v2)
