Skip to content

Commit

Permalink
Merge pull request #856 from douglasjacobsen/add-target-to-softwre-pr…
Browse files Browse the repository at this point in the history
…ovenance

Add target information to spack software output
  • Loading branch information
rfbgo authored Jan 30, 2025
2 parents 9c78b49 + 23d5bbc commit d3e31a8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,7 @@ def _package_dict_from_str(self, in_str):
"version": "",
"compiler": "",
"compiler_version": "",
"target": "",
"variants": "",
}

Expand All @@ -1317,7 +1318,10 @@ def _package_dict_from_str(self, in_str):
info_dict["compiler_version"] = parts[3]

if len(parts) >= 5:
info_dict["variants"] = ",".join(parts[4:]).strip()
info_dict["target"] = parts[4]

if len(parts) >= 6:
info_dict["variants"] = ",".join(parts[5:]).strip()

if info_dict["name"]:
return info_dict
Expand All @@ -1334,7 +1338,7 @@ def package_provenance(self):
"""
find_args = [
"find",
'--format="{name},{version},{compiler.name},{compiler.version},{variants}"',
'--format="{name},{version},{compiler.name},{compiler.version},{target},{variants}"',
"-c",
]

Expand Down

0 comments on commit d3e31a8

Please sign in to comment.