Skip to content

Commit

Permalink
chore: upgrade rules_python near HEAD (#245)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexeagle authored Jan 19, 2024
1 parent e988ed4 commit 43beacc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
7 changes: 7 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
14 changes: 8 additions & 6 deletions e2e/smoke/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
7 changes: 4 additions & 3 deletions py/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)

0 comments on commit 43beacc

Please sign in to comment.