import warnings


def read_requirements(filename):
    """ Read requirements file and process them into a list
    for usage in the setup function.

    Arguments
    ---------
    filename : str
        Path to the file to read line by line

    Returns
    --------
    list
        list of requirements::

            ['package==1.0', 'thing>=9.0']
    """

    requirements = []

    try:
        with open(filename, 'rb') as f:
            for line in f.readlines():
                line = line.strip()
                if not line or line.startswith(b'#') or line == '':
                    continue
                requirements.append(line)
    except IOError:
        warnings.warn('{0} was not found'.format(filename))

    return requirements