Skip to content

Commit

Permalink
Correctly propagate build deps of runtime deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed May 21, 2024
1 parent 52bd0b2 commit ea085ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alibuild_helpers/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,10 @@ def doBuild(args, parser):
spec[full_key].add(dep)
# Runtime deps of build deps should count as build deps.
spec[full_key] |= specs[dep]["full_requires" if key == "build_requires" else full_key]
# Propagate build deps of runtime deps, so that they are not added into
# the generated modulefile by alibuild-generate-module.
for dep in spec["runtime_requires"]:
spec["full_build_requires"] |= specs[dep]["full_build_requires"]
# If something requires or runtime_requires a package, then it's not a
# pure build_requires only anymore, so we drop it from the list.
spec["full_build_requires"] -= spec["full_runtime_requires"]
Expand Down

0 comments on commit ea085ad

Please sign in to comment.