From f679a0f2bb9d01b67293acef103c7126825acb44 Mon Sep 17 00:00:00 2001 From: Jon Brandvein Date: Thu, 1 Aug 2019 12:58:36 -0400 Subject: [PATCH] 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 #9019. Work toward #9006. RELNOTES: None --- WORKSPACE | 10 ++++++++++ .../shell/integration/modify_execution_info_test.sh | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index cf75915b2318e0..7c665b467567ba 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -79,6 +79,16 @@ new_local_repository( path = "./third_party/protobuf/3.6.1/", ) +# This is a mock version of bazelbuild/rules_python that contains only +# @rules_python//python:defs.bzl. It is used by protobuf. +# TODO(#9029): We could potentially replace this with the real @rules_python. +new_local_repository( + name = "rules_python", + path = "./third_party/rules_python", + build_file = "//third_party/rules_python:BUILD", + workspace_file = "//third_party/rules_python:rules_python.WORKSPACE", +) + local_repository( name = "googleapis", path = "./third_party/googleapis/", diff --git a/src/test/shell/integration/modify_execution_info_test.sh b/src/test/shell/integration/modify_execution_info_test.sh index ed29252ec54c5d..17ea834eca70aa 100755 --- a/src/test/shell/integration/modify_execution_info_test.sh +++ b/src/test/shell/integration/modify_execution_info_test.sh @@ -158,6 +158,16 @@ new_local_repository( path = "$(dirname $(rlocation io_bazel/third_party/protobuf/3.6.1/BUILD))", build_file = "$(rlocation io_bazel/third_party/protobuf/3.6.1/BUILD)", ) + +# TODO(#9029): May require some adjustment if/when we depend on the real +# @rules_python in the real source tree, since this third_party/ package won't +# be available. +new_local_repository( + name = "rules_python", + path = "$(dirname $(rlocation io_bazel/third_party/rules_python/rules_python.WORKSPACE))", + build_file = "$(rlocation io_bazel/third_party/rules_python/BUILD)", + workspace_file = "$(rlocation io_bazel/third_party/rules_python/rules_python.WORKSPACE)", +) EOF fi local pkg="${FUNCNAME[0]}"