diff --git a/conda_forge_tick/migrators/arch.py b/conda_forge_tick/migrators/arch.py index bfe81dd6f..67f80bbbb 100644 --- a/conda_forge_tick/migrators/arch.py +++ b/conda_forge_tick/migrators/arch.py @@ -9,15 +9,9 @@ get_deps_from_outputs_lut, make_outputs_lut_from_graph, ) -from conda_forge_tick.migrators.core import GraphMigrator, _sanitized_muids +from conda_forge_tick.migrators.core import GraphMigrator from conda_forge_tick.os_utils import pushd -from conda_forge_tick.utils import ( - as_iterable, - frozen_to_json_friendly, - pluck, - yaml_safe_dump, - yaml_safe_load, -) +from conda_forge_tick.utils import as_iterable, pluck, yaml_safe_dump, yaml_safe_load from .migration_yaml import all_noarch @@ -180,17 +174,18 @@ def __init__( def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool: if super().filter(attrs): return True - muid = frozen_to_json_friendly(self.migrator_uid(attrs)) for arch in self.arches: configured_arch = ( attrs.get("conda-forge.yml", {}).get("provider", {}).get(arch) + ) or ( + attrs.get("conda-forge.yml", {}).get("build_platform", {}).get(arch) + not in [None, arch] ) - if configured_arch: - return muid in _sanitized_muids( - attrs.get("pr_info", {}).get("PRed", []), - ) - else: - return False + if not configured_arch: + # This arch is not in provider or build_platform + return False + + return True def migrate( self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any @@ -347,17 +342,18 @@ def __init__( def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool: if super().filter(attrs): return True - muid = frozen_to_json_friendly(self.migrator_uid(attrs)) for arch in self.arches: configured_arch = ( attrs.get("conda-forge.yml", {}).get("provider", {}).get(arch) + ) or ( + attrs.get("conda-forge.yml", {}).get("build_platform", {}).get(arch) + not in [None, arch] ) - if configured_arch: - return muid in _sanitized_muids( - attrs.get("pr_info", {}).get("PRed", []), - ) - else: - return False + if not configured_arch: + # This arch is not in provider or build_platform + return False + + return True def migrate( self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any