Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rules_python #1120

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module(

bazel_dep(name = "bazel_skylib", version = "1.1.1")
bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "rules_python", version = "0.20.0")
bazel_dep(name = "rules_python", version = "0.26.0")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason to bump the minimum rules_python version here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to fix the failure with bazel@head reported here


tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools")
use_repo(
Expand Down
4 changes: 3 additions & 1 deletion WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

load("@rules_python//python:repositories.bzl", "python_register_toolchains")
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
name = "python3_9",
python_version = "3.9",
)

py_repositories()

load("//:docs/stardoc_repository.bzl", "stardoc_repository")

stardoc_repository()
Expand Down
4 changes: 3 additions & 1 deletion examples/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ load("//deps:deps_jvm_external.bzl", "deps_jvm_external")

deps_jvm_external()

load("@rules_python//python:repositories.bzl", "python_register_toolchains")
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

python_register_toolchains(
name = "python3_9",
python_version = "3.9",
)

py_repositories()

load("@python3_9//:defs.bzl", py3_interpreter = "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")

Expand Down
2 changes: 1 addition & 1 deletion foreign_cc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ bzl_library(
"@bazel_skylib//lib:collections",
"@bazel_skylib//lib:paths",
"@bazel_skylib//lib:versions",
"@rules_python//docs:defs",
"@rules_python//python:defs_bzl",
],
)
6 changes: 3 additions & 3 deletions foreign_cc/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def rules_foreign_cc_dependencies(
maybe(
http_archive,
name = "rules_python",
sha256 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841",
strip_prefix = "rules_python-0.23.1",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.23.1.tar.gz",
sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
strip_prefix = "rules_python-0.26.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.26.0.tar.gz",
)