def version_str_to_version(version_str):
    """ Convert a string version to a tuple of integers.
    """
    curr_v = version_str.split(".")
    for i, element in enumerate(curr_v):
        try:
            curr_v[i] = int(element)
        except ValueError:
            pass

    return tuple(curr_v)