#NEWLINE# def install( self , install_options , global_options = ( ) , * args , **kwargs ) : #NEWLINE# #INDENT# 'Install everything in this set (after having downloaded and unpacked the packages)' #NEWLINE# to_install = [ r for r in self . requirements . values ( ) if ( not r . satisfied_by ) ] #NEWLINE# if to_install : #NEWLINE# #INDENT# logger . notify ( ( 'Installing collected packages: %s' % ', ' . join ( [ req . name for req in to_install ] ) ) ) #NEWLINE# #UNINDENT# logger . indent += 2 #NEWLINE# try : #NEWLINE# #INDENT# for requirement in to_install : #NEWLINE# #INDENT# if requirement . conflicts_with : #NEWLINE# #INDENT# logger . notify ( ( 'Found existing installation: %s' % requirement . conflicts_with ) ) #NEWLINE# logger . indent += 2 #NEWLINE# try : #NEWLINE# #INDENT# requirement . uninstall ( auto_confirm = True ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# logger . indent -= 2 #NEWLINE# #UNINDENT# #UNINDENT# try : #NEWLINE# #INDENT# requirement . install ( install_options , self , * args , ** kwargs ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# if ( requirement . conflicts_with and ( not requirement . install_succeeded ) ) : #NEWLINE# #INDENT# requirement . rollback_uninstall ( ) #NEWLINE# #UNINDENT# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( requirement . conflicts_with and requirement . install_succeeded ) : #NEWLINE# #INDENT# requirement . commit_uninstall ( ) #NEWLINE# #UNINDENT# #UNINDENT# requirement . remove_temporary_source ( ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# logger . indent -= 2 #NEWLINE# #UNINDENT# self . successfully_installed = to_install