Skip to content

Commit 8c1786b

Browse files
committed
Add rules_python stanza to WORKSPACE files
Fixes the following breakages under Bazel 7: ```txt $ bazel build //src/... ERROR: error loading package '@@bazel_tools//src/main/protobuf': cannot load '@@rules_python//python:proto.bzl': no such file ERROR: .../src/java/io/bazel/rulesscala/coverage/instrumenter/BUILD:3:12: error loading package '@@bazel_tools//src/main/protobuf': cannot load '@@rules_python//python:proto.bzl': no such file and referenced by '//src/java/io/bazel/rulesscala/coverage/instrumenter:instrumenter' ```
1 parent 2be1f1a commit 8c1786b

File tree

13 files changed

+138
-0
lines changed

13 files changed

+138
-0
lines changed

WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
1515

1616
bazel_skylib_workspace()
1717

18+
http_archive(
19+
name = "rules_python",
20+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
21+
strip_prefix = "rules_python-0.36.0",
22+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
23+
)
24+
25+
load("@rules_python//python:repositories.bzl", "py_repositories")
26+
27+
py_repositories()
28+
1829
_build_tools_release = "5.1.0"
1930

2031
http_archive(

dt_patches/test_dt_patches/WORKSPACE

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
1424
local_repository(
1525
name = "io_bazel_rules_scala",
1626
path = "../..",

dt_patches/test_dt_patches_user_srcjar/WORKSPACE

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
1423
local_repository(
1524
name = "io_bazel_rules_scala",
1625
path = "../..",

examples/crossbuild/WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
24+
1425
local_repository(
1526
name = "io_bazel_rules_scala",
1627
path = "../..",

examples/scala3/WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
24+
1425
local_repository(
1526
name = "io_bazel_rules_scala",
1627
path = "../..",

examples/semanticdb/WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ http_archive(
1414
],
1515
)
1616

17+
http_archive(
18+
name = "rules_python",
19+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
20+
strip_prefix = "rules_python-0.36.0",
21+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
22+
)
23+
24+
load("@rules_python//python:repositories.bzl", "py_repositories")
25+
26+
py_repositories()
27+
1728
local_repository(
1829
name = "io_bazel_rules_scala",
1930
path = "../..",

examples/testing/multi_frameworks_toolchain/WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
24+
1425
local_repository(
1526
name = "io_bazel_rules_scala",
1627
path = "../../..",

examples/testing/scalatest_repositories/WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
24+
1425
local_repository(
1526
name = "io_bazel_rules_scala",
1627
path = "../../..",

examples/testing/specs2_junit_repositories/WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
24+
1425
local_repository(
1526
name = "io_bazel_rules_scala",
1627
path = "../../..",

test_cross_build/WORKSPACE

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
1424
http_archive(
1525
name = "rules_proto",
1626
sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",

test_version/WORKSPACE.template

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
24+
1425
http_archive(
1526
name = "rules_proto",
1627
sha256 = "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",

third_party/test/example_external_workspace/WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
24+
1425
local_repository(
1526
name = "io_bazel_rules_scala",
1627
path = "../../..",

third_party/test/proto/WORKSPACE

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ http_archive(
1111
],
1212
)
1313

14+
http_archive(
15+
name = "rules_python",
16+
sha256 = "ca77768989a7f311186a29747e3e95c936a41dffac779aff6b443db22290d913",
17+
strip_prefix = "rules_python-0.36.0",
18+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.36.0/rules_python-0.36.0.tar.gz",
19+
)
20+
21+
load("@rules_python//python:repositories.bzl", "py_repositories")
22+
23+
py_repositories()
1424
local_repository(
1525
name = "io_bazel_rules_scala",
1626
path = "../../../",

0 commit comments

Comments
 (0)