def get_closest_mac_host_platform_pair(darwin_version_upper_bound,
                                       platform_name_map=SUPPORTED_PLATFORM_NORMALIZED_NAMES):
  """Return the (host, platform) pair for the highest known darwin version less than the bound."""
  darwin_versions = [int(x[1]) for x in platform_name_map if x[0] == 'darwin']
  bounded_darwin_versions = [v for v in darwin_versions if v <= int(darwin_version_upper_bound)]
  if not bounded_darwin_versions:
    return None, None
  max_darwin_version = str(max(bounded_darwin_versions))
  return platform_name_map[('darwin', max_darwin_version)]
def get_closest_mac_host_platform_pair ( darwin_version_upper_bound , platform_name_map = SUPPORTED_PLATFORM_NORMALIZED_NAMES ) : darwin_versions = [ int ( x [ 1 ] ) for x in platform_name_map if x [ 0 ] == 'darwin' ] bounded_darwin_versions = [ v for v in darwin_versions if v <= int ( darwin_version_upper_bound ) ] if not bounded_darwin_versions : return None , None max_darwin_version = str ( max ( bounded_darwin_versions ) ) return platform_name_map [ ( 'darwin' , max_darwin_version ) ]
Return the (host, platform) pair for the highest known darwin version less than the bound.