#NEWLINE# def _gather_pips_to_install( self , requires_files , extra_pips = None ) : #NEWLINE# #INDENT# 'Analyze requires_files and extra_pips.\n\n        Updates `self.forced_pips` and `self.pips_to_install`.\n        Writes requirements to `self.gathered_requires_filename`.\n        ' #NEWLINE# ignore_pips = set ( self . python_names ) #NEWLINE# ignore_pips . update ( self . ignore_pips ) #NEWLINE# forced_pips = set ( ) #NEWLINE# forced_distro_pips = self . distro . get_dependency_config ( 'forced_pips' , quiet = True ) #NEWLINE# if forced_distro_pips : #NEWLINE# #INDENT# forced_pips . update ( forced_distro_pips ) #NEWLINE# #UNINDENT# ( compatibles , incompatibles ) = self . multipip . resolve ( extra_pips , requires_files , ignore_pips , forced_pips ) #NEWLINE# self . pips_to_install = compatibles #NEWLINE# sh . write_file ( self . gathered_requires_filename , '\n' . join ( self . pips_to_install ) ) #NEWLINE# ( pip_requirements , raw_requirements ) = pip_helper . read_requirement_files ( [ self . gathered_requires_filename ] ) #NEWLINE# pips_to_install = sorted ( incompatibles , cmp = sort_req ) #NEWLINE# utils . log_iterable ( pips_to_install , logger = LOG , header = 'Full known python dependency list' ) #NEWLINE# for ( name , lines ) in incompatibles . items ( ) : #NEWLINE# #INDENT# LOG . warn ( 'Incompatible requirements found for %s' , colorizer . quote ( name , quote_color = 'red' ) ) #NEWLINE# for line in lines : #NEWLINE# #INDENT# LOG . warn ( line ) #NEWLINE# #UNINDENT# #UNINDENT# if ( not self . pips_to_install ) : #NEWLINE# #INDENT# LOG . error ( 'No valid dependencies found. Something went wrong.' ) #NEWLINE# raise exc . DependencyException ( 'No valid dependencies found' ) #NEWLINE# #UNINDENT# self . forced_pips = [ ] #NEWLINE# forced_pip_keys = [ ] #NEWLINE# for req in [ pip_helper . extract_requirement ( line ) for line in self . pips_to_install ] : #NEWLINE# #INDENT# if ( ( req . key in incompatibles ) and ( req . key not in forced_pip_keys ) ) : #NEWLINE# #INDENT# self . forced_pips . append ( req ) #NEWLINE# forced_pip_keys . append ( req . key ) #NEWLINE# #UNINDENT# #UNINDENT# self . forced_pips = sorted ( self . forced_pips , cmp = sort_req ) #NEWLINE# forced_pips = [ str ( req ) for req in self . forced_pips ] #NEWLINE# utils . log_iterable ( forced_pips , logger = LOG , header = 'Automatically forced python dependencies' ) #NEWLINE# sh . write_file ( self . forced_requires_filename , '\n' . join ( forced_pips ) )