Skip to content

Commit 78a7ca2

Browse files
committed
Add third_party/rules_python to WORKSPACE as @rules_python
These will be used by third_party/protobuf in a follow-up. Also update a test that uses protobuf and that will break when protobuf is updated (since the test can't be changed in the same PR as third_party/). Break-out of bazelbuild#9019. Work toward bazelbuild#9006. RELNOTES: None
1 parent 642933f commit 78a7ca2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

WORKSPACE

+10
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ new_local_repository(
7979
path = "./third_party/protobuf/3.6.1/",
8080
)
8181

82+
# This is a mock version of bazelbuild/rules_python that contains only
83+
# @rules_python//python:defs.bzl. It is used by protobuf.
84+
# TODO(#9029): We could potentially replace this with the real @rules_python.
85+
new_local_repository(
86+
name = "rules_python",
87+
path = "./third_party/rules_python",
88+
build_file = "//third_party/rules_python:BUILD",
89+
workspace_file = "//third_party/rules_python:rules_python.WORKSPACE",
90+
)
91+
8292
local_repository(
8393
name = "googleapis",
8494
path = "./third_party/googleapis/",

src/test/shell/integration/modify_execution_info_test.sh

+8
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,14 @@ new_local_repository(
158158
path = "$(dirname $(rlocation io_bazel/third_party/protobuf/3.6.1/BUILD))",
159159
build_file = "$(rlocation io_bazel/third_party/protobuf/3.6.1/BUILD)",
160160
)
161+
162+
# TODO(#9029): May require some adjustment if/when we depend on the real
163+
# @rules_python in the real source tree, since this third_party/ package won't
164+
# be available.
165+
local_repository(
166+
name = "rules_python",
167+
path = "$(dirname $(rlocation io_bazel/third_party/rules_python/rules_python.WORKSPACE))",
168+
)
161169
EOF
162170
fi
163171
local pkg="${FUNCNAME[0]}"

0 commit comments

Comments
 (0)