Take a string version and conver it to a tuple (for easier comparison), e.g.:

            "1.2.3" --> (1, 2, 3)
            "1.2" --> (1, 2, 0)
            "1" --> (1, 0, 0)

def parse_version(v):
    """
        Take a string version and conver it to a tuple (for easier comparison), e.g.:

            "1.2.3" --> (1, 2, 3)
            "1.2" --> (1, 2, 0)
            "1" --> (1, 0, 0)
    """
    parts = v.split(".")
    # Pad the list to make sure there is three elements so that we get major, minor, point
    # comparisons that default to "0" if not given.  I.e. "1.2" --> (1, 2, 0)
    parts = (parts + 3 * ['0'])[:3]
    return tuple(int(x) for x in parts)