#NEWLINE# def extract( line ) : #NEWLINE# #INDENT# if ( line . startswith ( '-e' ) or line . startswith ( '--editable' ) ) : #NEWLINE# #INDENT# if line . startswith ( '-e' ) : #NEWLINE# #INDENT# line = line [ 2 : ] . strip ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# line = line [ len ( '--editable' ) : ] . strip ( ) . lstrip ( '=' ) #NEWLINE# #UNINDENT# req = pip_req . InstallRequirement . from_editable ( line , comes_from = '??' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# req = pip_req . InstallRequirement . from_line ( line , comes_from = '??' ) #NEWLINE# #UNINDENT# if req . req : #NEWLINE# #INDENT# match = PYTHON_KEY_VERSION_RE . match ( req . req . key ) #NEWLINE# if line : #NEWLINE# #INDENT# req . req = pkg_resources . Requirement . parse ( ( '%s>=%s' % ( match . group ( 1 ) , match . group ( 2 ) ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return req