Skip to content

Commit

Permalink
Add 'origin' metadata to python dependencies (#564)
Browse files Browse the repository at this point in the history
While I don't think we should discriminate between dependency origins for
general use, this is useful metadata in some contexts and is easy to
include.
  • Loading branch information
cottsay authored Aug 22, 2023
1 parent 4a70c62 commit c8995e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion colcon_core/package_augmentation/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def create_dependency_descriptor(requirement_string):
}

requirement = parse_requirement(requirement_string)
metadata = {}
metadata = {
'origin': 'python',
}
for symbol, version in (requirement.constraints or []):
if symbol in symbol_mapping:
metadata[symbol_mapping[symbol]] = version
Expand Down

0 comments on commit c8995e3

Please sign in to comment.