Skip to content

Commit 4b8f79a

Browse files
committed
Updating toolchain test to load bazel skylib
This fixes a problem where bazel skylib does not load during the toolchain integration test.
1 parent 2df3259 commit 4b8f79a

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

internal_deps.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
2020
def rules_python_internal_deps():
2121
"""Fetches all required dependencies for rules_python tests and tools."""
2222

23+
# This version is also used in python/tests/toolchains/workspace_template/WORKSPACE.tmpl
24+
# and tests/ignore_root_user_error/WORKSPACE.
25+
# If you update this dependency, please update the tests as well.
2326
maybe(
2427
http_archive,
2528
name = "bazel_skylib",

python/tests/toolchains/workspace_template/WORKSPACE.tmpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,15 @@ python_register_toolchains(
2525
name = "python",
2626
python_version = "%python_version%",
2727
)
28+
29+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
30+
http_archive(
31+
name = "bazel_skylib",
32+
urls = [
33+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
34+
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
35+
],
36+
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
37+
)
38+
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
39+
bazel_skylib_workspace()

tests/ignore_root_user_error/WORKSPACE

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,15 @@ python_register_toolchains(
1010
ignore_root_user_error = True,
1111
python_version = "3.9",
1212
)
13+
14+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
15+
http_archive(
16+
name = "bazel_skylib",
17+
urls = [
18+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
19+
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
20+
],
21+
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
22+
)
23+
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
24+
bazel_skylib_workspace()

0 commit comments

Comments
 (0)