Merge pull request #12632 from deannagarcia/23.x

Cherrypick fixes for 23.0-rc3
pull/12638/head
deannagarcia 2 years ago committed by GitHub
commit 9e2941faa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      objectivec/BUILD.bazel
  2. 17
      python/internal.bzl

@ -45,6 +45,7 @@ genrule(
for ext in _OBJC_EXTS
]),
exec_tools = ["//:protoc"],
tags = ["manual"],
)
staleness_test(

@ -1,4 +1,12 @@
# Internal helpers for building the Python protobuf runtime.
"""
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
@ -7,10 +15,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:

Loading…
Cancel
Save