Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cargo dependency renaming #55

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion colcon_cargo/package_augmentation/cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def create_dependency_descriptor(name, constraints, path):
"""
Create a dependency descriptor from a Cargo dependency specification.

:param name: The name of the dependee
:param name: The name of the dependee as it is imported
:param constraints: The dependency constraints, either a string or
a dict
:param path: The directory from where relative paths should be
Expand All @@ -94,6 +94,7 @@ def create_dependency_descriptor(name, constraints, path):
else:
source = constraints.get('git') or \
constraints.get('registry')
name = constraints.get('package', name)
else:
source = None
metadata = {
Expand Down
2 changes: 1 addition & 1 deletion test/rust-sample-package/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rust-pure-library = {path = "../rust-pure-library"}
local-rust-pure-library = {package = "rust-pure-library", path = "../rust-pure-library"}
Loading