Skip to content

Commit

Permalink
Use a patch to remove the register_toolchains call from the MODULE
Browse files Browse the repository at this point in the history
This prevents downstream users from having to have a Python toolchain
with the given name setup.

Fixes #33
  • Loading branch information
rickeylev committed May 1, 2023
1 parent 0c9c692 commit 3d8a4dd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_testing-{TAG}.tar.gz"
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_testing-{TAG}.tar.gz",
"patches": {
"remove_register_toolchains.patch": "sha256-TSdJKlMRNjqVEpPFjV3CItj8EKi5Zm6qabiIPVYtvnc="
}
}
18 changes: 18 additions & 0 deletions remove_register_toolchains.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/MODULE.bazel b/MODULE.bazel
index 046e33e..fc0dde5 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -31,9 +31,10 @@ python.toolchain(
)
use_repo(python, "python3_11_toolchains")

-register_toolchains(
- "@python3_11_toolchains//:all",
-)
+# Dev only. Commented out by BCR publishing patch
+# register_toolchains(
+# "@python3_11_toolchains//:all",
+# )

pip = use_extension(
"@rules_python//python:extensions.bzl",

0 comments on commit 3d8a4dd

Please sign in to comment.