From 43beacc2a5f58250af94f981325a79debb5e7250 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 19 Jan 2024 10:30:45 -0800 Subject: [PATCH] chore: upgrade rules_python near HEAD (#245) We need Matt's upstream fix which isn't released yet --- ### Type of change - Bug fix (change which fixes an issue) ### Test plan - Covered by existing test cases --- MODULE.bazel | 7 +++++++ e2e/smoke/MODULE.bazel | 14 ++++++++------ py/repositories.bzl | 7 ++++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 4b885e90..0b2e55ec 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -11,3 +11,10 @@ module( bazel_dep(name = "aspect_bazel_lib", version = "1.38.1") bazel_dep(name = "bazel_skylib", version = "1.4.2") bazel_dep(name = "rules_python", version = "0.27.1") + +archive_override( + module_name = "rules_python", + urls = "https://github.com/bazelbuild/rules_python/archive/52381415be9d3618130f02a821aef50de1e3af09.tar.gz", + integrity = "sha256-pYfEFNWqygSEElDYgJsuIeDYn9oll/rZB0GcR+6rirA=", + strip_prefix = "rules_python-52381415be9d3618130f02a821aef50de1e3af09", +) \ No newline at end of file diff --git a/e2e/smoke/MODULE.bazel b/e2e/smoke/MODULE.bazel index 3c02c0e6..10e117c6 100644 --- a/e2e/smoke/MODULE.bazel +++ b/e2e/smoke/MODULE.bazel @@ -9,14 +9,16 @@ local_path_override( #---SNIP--- Below here is re-used in the snippet published on releases bazel_dep(name = "rules_python", dev_dependency = True, version = "0.27.1") +# NB: users need this as well, until a new version of rules_python is released +archive_override( + module_name = "rules_python", + urls = "https://github.com/bazelbuild/rules_python/archive/52381415be9d3618130f02a821aef50de1e3af09.tar.gz", + integrity = "sha256-pYfEFNWqygSEElDYgJsuIeDYn9oll/rZB0GcR+6rirA=", + strip_prefix = "rules_python-52381415be9d3618130f02a821aef50de1e3af09", +) + python = use_extension("@rules_python//python/extensions:python.bzl", "python") python.toolchain( - name = "python3", configure_coverage_tool = True, python_version = "3.11", ) -use_repo(python, "python3_toolchains") - -register_toolchains( - "@python3_toolchains//:all", -) \ No newline at end of file diff --git a/py/repositories.bzl b/py/repositories.bzl index 3b9efb0a..4188732b 100644 --- a/py/repositories.bzl +++ b/py/repositories.bzl @@ -36,9 +36,10 @@ def rules_py_dependencies(): url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v1.38.1.tar.gz", ) + # We require #1671 which isn't in a release as of 19 Jan 2024 http_archive( name = "rules_python", - sha256 = "cff4c0ac0873ce089557b72828f34b82e67f35e9accfe414b5c3230907104a87", - strip_prefix = "rules_python-9facc3e3341f156377c61afbaa1dfb79a3843b78", - url = "https://github.com/bazelbuild/rules_python/archive/9facc3e3341f156377c61afbaa1dfb79a3843b78.tar.gz", + sha256 = "a587c414d5aaca04841250d8809b2e21e0d89fda2597fad907419c47eeab8ab0", + strip_prefix = "rules_python-52381415be9d3618130f02a821aef50de1e3af09", + url = "https://github.com/bazelbuild/rules_python/archive/52381415be9d3618130f02a821aef50de1e3af09.tar.gz", )