Skip to content

Commit

Permalink
Merge pull request #2995 from isuruf/compilers
Browse files Browse the repository at this point in the history
Allow migrating compilers using `include_build`
  • Loading branch information
isuruf authored Sep 4, 2024
2 parents 89b776e + 1ced9e4 commit 065d353
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions conda_forge_tick/make_migrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions conda_forge_tick/migrators/migration_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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"],
Expand Down

0 comments on commit 065d353

Please sign in to comment.