#NEWLINE# def parse_requirements( * filenames ) : #NEWLINE# #INDENT# "\n    We generate our install_requires from the pip-requires and test-requires\n    files so that we don't have to maintain the dependency definitions in\n    two places.\n    " #NEWLINE# requirements = [ ] #NEWLINE# for f in filenames : #NEWLINE# #INDENT# for line in open ( f , 'r' ) . read ( ) . split ( '\n' ) : #NEWLINE# #INDENT# if re . match ( '(\\s*#)|(\\s*$)' , line ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if re . match ( '\\s*-e\\s+' , line ) : #NEWLINE# #INDENT# pkg = re . sub ( '\\s*-e\\s+.*#egg=(.*)$' , '\\1' , line ) #NEWLINE# requirements . append ( ( '%s' % f ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if re . match ( '\\s*-f\\s+' , line ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# requirements . append ( line ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return requirements