import pathlib
from typing import List


def _get_dependencies(requirements_file: pathlib.Path) -> List[str]:
    """
    Return requirements from a requirements file.
    This expects a requirements file with no ``--find-links`` lines.
    """
    lines = requirements_file.read_text().strip().split('\n')
    deps = []
    for dep in lines:
        if dep.startswith('#'):
            continue
        if dep.startswith('https://'):
            pkg_string = dep.split('#egg=')[1]
            pkg, version = pkg_string.split('-')
            dep = pkg + ' @ ' + dep
        deps.append(dep)
    return deps