Do no longer depend on deprecated //external:python_headers (#15236)

`bind()` targets are deprecated and unsupported with Bzlmod. Specifying the dependency directly as a mitigation.

Alternative: Define an `alias()` within `/third_party/BUILD`.

Closes #15236

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15236 from mering:alias-python-headers 801ac73313
PiperOrigin-RevId: 595737575
pull/15277/head
Marcel 1 year ago committed by Copybara-Service
parent 7e32450ccd
commit fbbe681409
  1. 5
      WORKSPACE
  2. 6
      python/build_targets.bzl

@ -191,11 +191,6 @@ load("@fuzzing_py_deps//:requirements.bzl", fuzzing_py_deps_install_deps = "inst
fuzzing_py_deps_install_deps()
bind(
name = "python_headers",
actual = "@system_python//:python_headers",
)
http_archive(
name = "rules_rust",
sha256 = "9ecd0f2144f0a24e6bc71ebcc50a1ee5128cedeceb32187004532c9710cb2334",

@ -85,7 +85,7 @@ def build_targets(name):
],
deps = select({
"//conditions:default": [],
":use_fast_cpp_protos": ["//external:python_headers"],
":use_fast_cpp_protos": ["@system_python//:python_headers"],
}),
)
@ -134,7 +134,7 @@ def build_targets(name):
"@com_google_absl//absl/strings",
] + select({
"//conditions:default": [],
":use_fast_cpp_protos": ["//external:python_headers"],
":use_fast_cpp_protos": ["@system_python//:python_headers"],
}),
)
@ -398,7 +398,7 @@ def build_targets(name):
hdrs = ["google/protobuf/proto_api.h"],
visibility = ["//visibility:public"],
deps = [
"//external:python_headers",
"@system_python//:python_headers",
],
)

Loading…
Cancel
Save