| 1 | diff --git a/src/MODULE.bazel b/src/MODULE.bazel
|
| 2 | index 2f8409cd04..edd3af4799 100644
|
| 3 | |
| 4 | |
| 5 | @@ -376,3 +376,30 @@
|
| 6 | sha256 = "47a3e63e1379f707af9c49df5c4fa0534332173c73c61f93d14555673bed7599",
|
| 7 | url = "https://github.com/hiroyuki-komatsu/japanpost_zipcode/raw/33524763837473258e7ba2f14b17fc3a70519831/ken_all.zip",
|
| 8 | )
|
| 9 | +
|
| 10 | +local_runtime_repo = use_repo_rule(
|
| 11 | + "@rules_python//python/local_toolchains:repos.bzl",
|
| 12 | + "local_runtime_repo",
|
| 13 | +)
|
| 14 | +
|
| 15 | +local_runtime_toolchains_repo = use_repo_rule(
|
| 16 | + "@rules_python//python/local_toolchains:repos.bzl",
|
| 17 | + "local_runtime_toolchains_repo",
|
| 18 | +)
|
| 19 | +
|
| 20 | +# Use local python instead of downloading a toolchain
|
| 21 | +# https://rules-python.readthedocs.io/en/latest/toolchains.html#local-toolchain
|
| 22 | +local_runtime_repo(
|
| 23 | + name = "local_python3",
|
| 24 | + interpreter_path = "python3",
|
| 25 | + on_failure = "fail",
|
| 26 | + dev_dependency = True
|
| 27 | +)
|
| 28 | +
|
| 29 | +local_runtime_toolchains_repo(
|
| 30 | + name = "local_toolchains",
|
| 31 | + runtimes = ["local_python3"],
|
| 32 | + dev_dependency = True
|
| 33 | +)
|
| 34 | +
|
| 35 | +register_toolchains("@local_toolchains//:all", dev_dependency = True)
|