Skip to content

Commit

Permalink
Add third_party/rules_python to WORKSPACE as @rules_python
Browse files Browse the repository at this point in the history
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. Closes bazelbuild#9048. Work toward bazelbuild#9006.

RELNOTES: None
PiperOrigin-RevId: 261176215
  • Loading branch information
brandjon authored and copybara-github committed Aug 1, 2019
1 parent 2714b88 commit cb4ba07
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
10 changes: 10 additions & 0 deletions src/test/shell/integration/modify_execution_info_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]}"
Expand Down

0 comments on commit cb4ba07

Please sign in to comment.