Skip to content

Commit

Permalink
Include more detailed dependency info
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoWilken committed Dec 13, 2023
1 parent e93ea1a commit 0f8f141
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions alibuild_helpers/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ def spec_info(spec):
"hash": spec["hash"],
}

def dependency_list(key):
return [spec_info(specs[dep]) for dep in specs[package].get(key, ())]

return json.dumps({
"comment": args.annotate.get(package),
"alibuild_version": __version__,
Expand All @@ -453,9 +456,16 @@ def spec_info(spec):
"architecture": args.architecture,
"defaults": args.defaults,
"package": spec_info(specs[package]),
"dependencies": [
spec_info(specs[dep]) for dep in specs[package].get("full_requires", ())
],
"dependencies": {
"direct": {
"build": dependency_list("build_requires"),
"runtime": dependency_list("runtime_requires"),
},
"recursive": { # includes direct deps and deps' deps
"build": dependency_list("full_build_requires"),
"runtime": dependency_list("full_runtime_requires"),
},
},
})


Expand Down

0 comments on commit 0f8f141

Please sign in to comment.