#NEWLINE# def install_dependency( logger , project , dependencies ) : #NEWLINE# #INDENT# ( dependencies_to_install , orig_installed_pkgs ) = _filter_dependencies ( logger , project , dependencies ) #NEWLINE# batch_dependencies = [ ] #NEWLINE# standalone_dependencies = [ ] #NEWLINE# local_mapping = project . get_property ( 'install_dependencies_local_mapping' ) #NEWLINE# for dependency in dependencies_to_install : #NEWLINE# #INDENT# url = getattr ( dependency , 'url' , None ) #NEWLINE# if ( ( dependency . name in local_mapping ) or url ) : #NEWLINE# #INDENT# install_type = 'standalone' #NEWLINE# logger . debug ( ( "Dependency '%s' has to be installed standalone" % dependency ) ) #NEWLINE# standalone_dependencies . append ( dependency ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# install_type = 'batch' #NEWLINE# logger . debug ( ( "Dependency '%s' will be included in batch install" % dependency ) ) #NEWLINE# batch_dependencies . append ( dependency ) #NEWLINE# #UNINDENT# logger . info ( "Processing %s dependency '%s%s'%s" , install_type , dependency . name , ( dependency . version if dependency . version else '' ) , ( ( ' from %s' % url ) if url else '' ) ) #NEWLINE# #UNINDENT# for standalone_dependency in standalone_dependencies : #NEWLINE# #INDENT# url = getattr ( standalone_dependency , 'url' , None ) #NEWLINE# log_file = project . expand_path ( '$dir_install_logs' , dependency . name ) #NEWLINE# log_file = re . sub ( '<|>|=' , '_' , log_file ) #NEWLINE# _do_install_dependency ( install_type , project , standalone_dependency , True , url , local_mapping . get ( dependency . name ) , log_file ) #NEWLINE# #UNINDENT# if len ( batch_dependencies ) : #NEWLINE# #INDENT# log_file = project . expand_path ( '$dir_install_logs' , 'install_batch' ) #NEWLINE# _do_install_dependency ( logger , project , batch_dependencies , True , False , None , log_file ) #NEWLINE# #UNINDENT# __reload_pip_if_updated ( logger , dependencies_to_install )