def parse_requirements(fn):
    """
    Parse a requirements file into a list of package specs.
    """
    with open(fn) as f:
        rv = []
        for line in f:
            line = line.strip()
            if not line or line.startswith('#'):
                continue
            rv.append(line)
        return rv