-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hi,
Could you please add a complete set of instructions on how to include and use with Bazel?
I added the following stanza to my WORKSPACE file:
git_repository(
name = "pybind11_protobuf",
branch = "main",
remote = "https://github.com/pybind/pybind11_protobuf.git",
strip_prefix = "pybind11_protobuf",
)
However, I cannot get the requirement for a com_google_protobuf dependency to work.
I believe the current practice would be to add this dep to MODULE.bazel:
https://registry.bazel.build/modules/protobuf/21.7
and then add this to the BUILD rule:
"@protobuf//:protos_python",
This however gives me this error:
no such package '@com_google_protobuf//': The repository '@com_google_protobuf' could not be resolved: Repository '@com_google_protobuf' is not defined and referenced by '@pybind11_protobuf//:native_proto_caster'
What's the correct way to get this to work?
(for future compatibility, I have filed a BCR request here bazelbuild/bazel-central-registry#1121 )