Remove patch to internal protobuf rules now that it's implemented in the proto repository.

859410bccc moved the patch to the protobuf repository.

PiperOrigin-RevId: 528804550
pull/13171/head
Deanna Garcia 2 years ago committed by Copybara-Service
parent 60be96e0bf
commit b9d8ff9f5f
  1. 30
      bazel/protobuf.patch
  2. 4
      bazel/workspace_deps.bzl

@ -38,33 +38,3 @@
# Search internally. # Search internally.
path = '.' path = '.'
--- python/internal.bzl
+++ python/internal.bzl
@@ -1,5 +1,11 @@
# Internal helpers for building the Python protobuf runtime.
+def _remove_cross_repo_path(path):
+ components = path.split("/")
+ if components[0] == "..":
+ return "/".join(components[2:])
+ return path
+
def _internal_copy_files_impl(ctx):
strip_prefix = ctx.attr.strip_prefix
if strip_prefix[-1] != "/":
@@ -7,10 +13,11 @@ def _internal_copy_files_impl(ctx):
src_dests = []
for src in ctx.files.srcs:
- if src.short_path[:len(strip_prefix)] != strip_prefix:
+ short_path = _remove_cross_repo_path(src.short_path)
+ if short_path[:len(strip_prefix)] != strip_prefix:
fail("Source does not start with %s: %s" %
- (strip_prefix, src.short_path))
- dest = ctx.actions.declare_file(src.short_path[len(strip_prefix):])
+ (strip_prefix, short_path))
+ dest = ctx.actions.declare_file(short_path[len(strip_prefix):])
src_dests.append([src, dest])
if ctx.attr.is_windows:

@ -23,8 +23,8 @@ def upb_deps():
_github_archive, _github_archive,
name = "com_google_protobuf", name = "com_google_protobuf",
repo = "https://github.com/protocolbuffers/protobuf", repo = "https://github.com/protocolbuffers/protobuf",
commit = "65e047d098bfdbed787b39d8facc0b74cf3cff73", commit = "859410bccc59aeeef1c48e34960fe93827767bac",
sha256 = "807c22ebfb865aa35c17bae77b8f8ecc19c9509c122dbc36f6262cb3c83f1f3c", sha256 = "64829c7a42556d3b6a3e19908abc98c0bd920823ac7546ca5372903a53a0acea",
patches = ["@upb//bazel:protobuf.patch"], patches = ["@upb//bazel:protobuf.patch"],
) )

Loading…
Cancel
Save