#NEWLINE# def read_requirement_files( files ) : #NEWLINE# #INDENT# pip_requirements = [ ] #NEWLINE# session = pip_download . PipSession ( ) #NEWLINE# for filename in files : #NEWLINE# #INDENT# if sh . isfile ( filename ) : #NEWLINE# #INDENT# cache_key = ( 'f:%s:%s' % ( sh . abspth ( filename ) , sh . getsize ( filename ) ) ) #NEWLINE# with REQUIREMENT_FILE_CACHE_LOCK : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# reqs = REQUIREMENT_FILE_CACHE [ cache_key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# reqs = tuple ( pip_req . parse_requirements ( filename , session = session ) ) #NEWLINE# REQUIREMENT_FILE_CACHE [ cache_key ] = reqs #NEWLINE# #UNINDENT# pip_requirements . extend ( reqs ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ( pip_requirements , [ req . req for req in pip_requirements ] )