Skip to content

Commit

Permalink
Add 'type' metadata to python dependencies
Browse files Browse the repository at this point in the history
While I don't think we should discriminate between dependency types for
general use, this is useful metadata in some contexts and is easy to
include.
  • Loading branch information
cottsay committed Jul 28, 2023
1 parent 7b70e61 commit b593af4
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 = {
'type': 'python',
}
for symbol, version in (requirement.constraints or []):
if symbol in symbol_mapping:
metadata[symbol_mapping[symbol]] = version
Expand Down

0 comments on commit b593af4

Please sign in to comment.