def CheckUselessComponentModules(virtualenv_interpreter):
 virtualenv_pip = os.path.join(os.path.dirname(virtualenv_interpreter), 'pip')
 component_modules = set(subprocess.check_output([virtualenv_pip, 'freeze'], env=GetCleanEnvironment()).splitlines())
 client_modules = dict(((x.key, x.version) for x in pip.get_installed_distributions()))
 for component_name in component_modules:
  if ('==' not in component_name):
   continue
  (dist_name, version) = component_name.split('==')
  if (dist_name in SKIPPED_MODULES):
   continue
  client_mod_version = client_modules.get(dist_name)
  if (client_mod_version is not None):
   print ('Useless client module %s' % dist_name)
   if (client_mod_version != version):
    print ('Conflicting component module version (%s)with client version (%s):' % (version, client_mod_version))

def CheckUselessComponentModules ( virtualenv_interpreter ) : virtualenv_pip = os . path . join ( os . path . dirname ( virtualenv_interpreter ) , 'pip' ) component_modules = set ( subprocess . check_output ( [ virtualenv_pip , 'freeze' ] , env = GetCleanEnvironment ( ) ) . splitlines ( ) ) client_modules = dict ( ( ( x . key , x . version ) for x in pip . get_installed_distributions ( ) ) ) for component_name in component_modules : if ( '==' not in component_name ) : continue ( dist_name , version ) = component_name . split ( '==' ) if ( dist_name in SKIPPED_MODULES ) : continue client_mod_version = client_modules . get ( dist_name ) if ( client_mod_version is not None ) : print ( 'Useless client module %s' % dist_name ) if ( client_mod_version != version ) : print ( 'Conflicting component module version (%s)with client version (%s):' % ( version , client_mod_version ) )
log warnings about useless client components modules .