def version_components(version):
    """Split version string into major1.major2.minor components."""
    components = version.split(".")
    num = len(components)

    if num < 1:
        raise ValueError("version should have at least one component.")

    major1 = components[0]

    if num >= 2:
        major2 = components[1]
    else:
        major2 = "0"

    if num >= 3:
        minor = components[2]
    else:
        minor = "0"

    return (major1, major2, minor)