#NEWLINE# def find_package( self , package ) : #NEWLINE# #INDENT# for path in self . paths ( ) : #NEWLINE# #INDENT# full = os . path . join ( path , package ) #NEWLINE# if os . path . exists ( full ) : #NEWLINE# #INDENT# return ( package , full ) #NEWLINE# #UNINDENT# if ( ( not os . path . isdir ( path ) ) and zipfile . is_zipfile ( path ) ) : #NEWLINE# #INDENT# zip = zipfile . ZipFile ( self , 'r' ) #NEWLINE# try : #NEWLINE# #INDENT# zip . read ( os . path . join ( package , '__init__.py' ) ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# zip . close ( ) #NEWLINE# return ( package , full ) #NEWLINE# #UNINDENT# zip . close ( ) #NEWLINE# #UNINDENT# #UNINDENT# raise InstallationError ( ( 'No package with the name %s found' % package ) )