setup.py
def parse_reqs(req_path='./requirements.txt'):
    """Recursively parse requirements from nested pip files."""
    install_requires = []
    with io.open(os.path.join(here, 'requirements.txt'), encoding='utf-8') as handle:
        # remove comments and empty lines
        lines = (line.strip() for line in handle
                 if line.strip() and not line.startswith('#'))

        for line in lines:
            # check for nested requirements files
            if line.startswith('-r'):
                # recursively call this function
                install_requires += parse_reqs(req_path=line[3:])

            else:
                # add the line as a new requirement
                install_requires.append(line)

    return install_requires
def parse_reqs(req_path='./requirements.txt'):
    install_requires = []
    with io.open(os.path.join(here, 'requirements.txt'), encoding='utf-8') as handle:
        # remove comments and empty lines
        lines = (line.strip() for line in handle
                 if line.strip() and not line.startswith('#'))

        for line in lines:
            # check for nested requirements files
            if line.startswith('-r'):
                # recursively call this function
                install_requires += parse_reqs(req_path=line[3:])

            else:
                # add the line as a new requirement
                install_requires.append(line)

    return install_requires
def parse_reqs ( req_path = './requirements.txt' ) : install_requires = [ ] with io . open ( os . path . join ( here , 'requirements.txt' ) , encoding = 'utf-8' ) as handle : # remove comments and empty lines lines = ( line . strip ( ) for line in handle if line . strip ( ) and not line . startswith ( '#' ) ) for line in lines : # check for nested requirements files if line . startswith ( '-r' ) : # recursively call this function install_requires += parse_reqs ( req_path = line [ 3 : ] ) else : # add the line as a new requirement install_requires . append ( line ) return install_requires
Recursively parse requirements from nested pip files.
Recursively parse requirements from nested pip files .