from typing import Tuple


def split_package_string(package_name_version_build_string: str) -> Tuple[str, str, str]:
    """Helper method for parsing package_name_version_build_string.

    Returns:
        Tuple (package_name, build_version, build_string)
    """
    package_nvbs_parts = package_name_version_build_string.split('-')
    if len(package_nvbs_parts) < 3:
        raise ValueError(f'Unexpected format in {package_nvbs_parts}')

    *_package_name_parts, build_version, build_string = package_nvbs_parts
    package_name = '-'.join(_package_name_parts)

    _pos = build_string.find('.')
    if _pos >= 0:
        # Remove any .conda at the end if present or other package type eg .tar.gz
        build_string = build_string[0:_pos]

    return package_name, build_version, build_string