From 1a8211bda5c14ef0b2bff3af062c049d5598f02f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 27 Jun 2024 15:32:45 +0200 Subject: just-import-cargo: rename generated targets file for defaults ... to avoid clashes with the existing target files when importing into a larger project. --- bin/just-import-cargo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/just-import-cargo.py') diff --git a/bin/just-import-cargo.py b/bin/just-import-cargo.py index a08870a..fef36ea 100755 --- a/bin/just-import-cargo.py +++ b/bin/just-import-cargo.py @@ -698,6 +698,7 @@ def main(): "target_root": "rust-rules-defaults", "rule_root": "rust-rules-root", "bindings": {"orig-rules": "rust-rules-root"}, + "target_file_name": "TARGETS.cargo_import" } main_rep = repo_name(root_name, root_version) @@ -715,7 +716,7 @@ def main(): defaults_dir = os.path.join(repo_root, "etc", "defaults", "rust") os.makedirs(defaults_dir, exist_ok=True) - with open(os.path.join(defaults_dir, "TARGETS"), "w") as f: + with open(os.path.join(defaults_dir, "TARGETS.cargo_import"), "w") as f: print(hdumps(defaults_dict), file=f) for pkg in metadata["packages"]: -- cgit v1.2.3