from pathlib import Path
from typing import List


def _load_package_list(pkg_list: Path) -> List[str]:
    """Load the list of packages to download.

    Arguments:
        pkg_list: path to the file that contains the package list

    Returns:
        A list of package names.
    """
    packages : List[str] = []
    with pkg_list.open('r', encoding='utf-8') as fp:
        for line in fp:
            packages.append(line.strip())
    return packages