vendor.py: send licenses to vendor_artifacts/
`./vendor.py` is going to produce a second file soon. Rather than
further cluttering the root directory with this kind of thing, make a
new home for it.
BUG=b:250919469
TEST=./vendor.py
Change-Id: Ifb20ca05d8bb03833f49c9eb4dcf9b26e5eadc95
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/rust_crates/+/4092859
Reviewed-by: Allen Webb <allenwebb@google.com>
Commit-Queue: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
diff --git a/projects/populate-workspace.py b/projects/populate-workspace.py
index 9fada5d..46e389f 100755
--- a/projects/populate-workspace.py
+++ b/projects/populate-workspace.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright 2022 The ChromiumOS Authors.
+# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Populates the top-level Cargo.toml with all necessary workspace entries."""
@@ -61,7 +61,7 @@
# The `toml` crate writes this as a massive line, which is hard to
# read. Since this is simple to write, write it directly.
# TODO(b/242668603): find a toml crate with prettier formatting
- f.write('[workspace]\nmembers = [\n')
+ f.write("[workspace]\nmembers = [\n")
for project in projects:
project = str(project)
assert '"' not in project and "\\" not in project, project
diff --git a/vendor.py b/vendor.py
index 56fd0d6..2845b44 100755
--- a/vendor.py
+++ b/vendor.py
@@ -889,7 +889,9 @@
patches = os.path.join(current_path, "patches")
vendor = os.path.join(current_path, "vendor")
crab_dir = os.path.join(current_path, "crab", "crates")
- license_shorthand_file = os.path.join(current_path, "licenses_used.txt")
+ license_shorthand_file = os.path.join(
+ current_path, "vendor_artifacts", "licenses_used.txt"
+ )
# First, actually run cargo vendor
run_cargo_vendor(current_path)
diff --git a/vendor_artifacts/README.md b/vendor_artifacts/README.md
new file mode 100644
index 0000000..bbf55e3
--- /dev/null
+++ b/vendor_artifacts/README.md
@@ -0,0 +1,6 @@
+This directory contains two things:
+- Files automatically generated by ../vendor.py
+- Scripts meant exclusively to work with these files
+
+Hopefully each thing in here should be Self-Documenting Enough to not warrant
+extra explanation in this file?
diff --git a/licenses_used.txt b/vendor_artifacts/licenses_used.txt
similarity index 100%
rename from licenses_used.txt
rename to vendor_artifacts/licenses_used.txt
diff --git a/verify_licenses.py b/vendor_artifacts/verify_licenses.py
similarity index 97%
rename from verify_licenses.py
rename to vendor_artifacts/verify_licenses.py
index b84b533..28b3b34 100755
--- a/verify_licenses.py
+++ b/vendor_artifacts/verify_licenses.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright 2022 The ChromiumOS Authors.
+# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Verifies license correctness.