diff --git a/README.md b/README.md index f3113d284..751715bef 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,10 @@ __migrator: # The bot will skip noarch feedstocks by default. include_noarch: false + # If `include_build` is set to true, the bot will include build requirements in the migration. + # The bot will skip build requirements by default, which prevents compiler migrations. + include_build: false + # The pr_limit controls how many PRs that bot makes in a single run. # Typical values range from 5 (small/slow) to 30 (large/fast). If not given, # the bot will scale this limit automatically to make new migrations more responsive diff --git a/conda_forge_tick/make_migrators.py b/conda_forge_tick/make_migrators.py index 43c28071d..0f4929986 100644 --- a/conda_forge_tick/make_migrators.py +++ b/conda_forge_tick/make_migrators.py @@ -256,6 +256,7 @@ def add_rebuild_migration_yaml( excluded_feedstocks, exclude_pinned_pkgs=exclude_pinned_pkgs, include_noarch=config.get("include_noarch", False), + include_build=config.get("include_build", False), ) # Note at this point the graph is made of all packages that have a diff --git a/conda_forge_tick/migrators/migration_yaml.py b/conda_forge_tick/migrators/migration_yaml.py index 3a19d6511..7a4ce273d 100644 --- a/conda_forge_tick/migrators/migration_yaml.py +++ b/conda_forge_tick/migrators/migration_yaml.py @@ -657,6 +657,7 @@ def create_rebuild_graph( excluded_feedstocks: MutableSet[str] = None, exclude_pinned_pkgs: bool = True, include_noarch: bool = False, + include_build: bool = False, ) -> nx.DiGraph: total_graph = copy.deepcopy(gx) excluded_feedstocks = set() if excluded_feedstocks is None else excluded_feedstocks @@ -677,7 +678,10 @@ def create_rebuild_graph( requirements = attrs.get("requirements", {}) host = requirements.get("host", set()) build = requirements.get("build", set()) - bh = host or build + if include_build: + bh = host | build + else: + bh = host or build only_python = "python" in package_names inclusion_criteria = bh & set(package_names) and ( include_noarch or not all_noarch(attrs, only_python=only_python) @@ -687,7 +691,7 @@ def create_rebuild_graph( all_reqs = requirements.get("run", set()) if inclusion_criteria: all_reqs = all_reqs | requirements.get("test", set()) - all_reqs = all_reqs | (host or build) + all_reqs = all_reqs | bh rq = get_deps_from_outputs_lut( all_reqs, gx.graph["outputs_lut"],