def parse_requirements(fname):
    """Read requirements from a pip-compatible requirements file."""
    with open(fname):
        lines = (line.strip() for line in open(fname))
        return [line for line in lines if line and not line.startswith("#")]