From 35d591f8a358e52727021ec35f3134d0fc29d6d2 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 28 Jul 2023 17:11:02 -0500 Subject: [PATCH] Add 'origin' metadata to python dependencies 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. --- colcon_core/package_augmentation/python.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/colcon_core/package_augmentation/python.py b/colcon_core/package_augmentation/python.py index 51a3794d..6bbe0e40 100644 --- a/colcon_core/package_augmentation/python.py +++ b/colcon_core/package_augmentation/python.py @@ -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