#NEWLINE# def get_export_entry( specification ) : #NEWLINE# #INDENT# m = ENTRY_RE . search ( specification ) #NEWLINE# if ( not m ) : #NEWLINE# #INDENT# result = None #NEWLINE# if ( ( '[' in specification ) or ( ']' in specification ) ) : #NEWLINE# #INDENT# raise DistlibException ( ( 'Invalid specification %r' % specification ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# d = m . groupdict ( ) #NEWLINE# name = d [ 'name' ] #NEWLINE# path = d [ 'callable' ] #NEWLINE# colons = path . count ( ':' ) #NEWLINE# if ( colons == 0 ) : #NEWLINE# #INDENT# ( prefix , suffix ) = ( path , None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( colons != 1 ) : #NEWLINE# #INDENT# raise DistlibException ( ( 'Invalid specification %r' % specification ) ) #NEWLINE# #UNINDENT# ( prefix , suffix ) = path . split ( ':' ) #NEWLINE# #UNINDENT# flags = d [ 'flags' ] #NEWLINE# if ( flags is None ) : #NEWLINE# #INDENT# if ( ( '[' in specification ) or ( ']' in specification ) ) : #NEWLINE# #INDENT# raise DistlibException ( ( 'Invalid specification %r' % specification ) ) #NEWLINE# #UNINDENT# flags = [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# flags = [ f . strip ( ) for f in flags . split ( ',' ) ] #NEWLINE# #UNINDENT# result = ExportEntry ( name , prefix , suffix , flags ) #NEWLINE# #UNINDENT# return result