def IsValidTargetForWrapper(target_extras, executable_target_pattern, spec):
 target_name = spec.get('target_name')
 if ((target_extras is not None) and re.search(target_extras, target_name)):
  return True
 if ((int(spec.get('mac_xctest_bundle', 0)) != 0) or ((spec.get('type', '') == 'executable') and (spec.get('product_extension', '') != 'bundle'))):
  if (executable_target_pattern is not None):
   if (not re.search(executable_target_pattern, target_name)):
    return False
  return True
 return False

def IsValidTargetForWrapper ( target_extras , executable_target_pattern , spec ) : target_name = spec . get ( 'target_name' ) if ( ( target_extras is not None ) and re . search ( target_extras , target_name ) ) : return True if ( ( int ( spec . get ( 'mac_xctest_bundle' , 0 ) ) != 0 ) or ( ( spec . get ( 'type' , '' ) == 'executable' ) and ( spec . get ( 'product_extension' , '' ) != 'bundle' ) ) ) : if ( executable_target_pattern is not None ) : if ( not re . search ( executable_target_pattern , target_name ) ) : return False return True return False
limit targets for xcode wrapper .