File tree 4 files changed +16
-3
lines changed 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ git_repository(
53
53
name = "com_google_protobuf" ,
54
54
remote = "https://github.com/protocolbuffers/protobuf.git" ,
55
55
tag = "v3.18.0-rc1" ,
56
+ patches = ["com_google_protobuf_build.patch" ],
56
57
)
57
58
58
59
load ("@com_google_protobuf//:protobuf_deps.bzl" , "protobuf_deps" )
@@ -71,5 +72,5 @@ grpc_deps()
71
72
72
73
bind (
73
74
name = "python_headers" ,
74
- actual = "@com_google_protobuf//util/python :python_headers" ,
75
+ actual = "@local_config_python// :python_headers" ,
75
76
)
Original file line number Diff line number Diff line change
1
+ --- BUILD
2
+ +++ BUILD
3
+ @@ -889,6 +889,8 @@
4
+ "//conditions:default": [],
5
+ ":use_fast_cpp_protos": ["//external:python_headers"],
6
+ }),
7
+ +
8
+ + visibility = ["//visibility:public"],
9
+ )
10
+
11
+ config_setting(
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ pybind_library(
70
70
"@com_google_absl//absl/strings" ,
71
71
"@com_google_protobuf//:proto_api" ,
72
72
"@com_google_protobuf//:protobuf" ,
73
+ "@com_google_protobuf//:python/google/protobuf/pyext/_message.so" , # fixdeps: keep
73
74
],
74
75
)
75
76
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const GlobalState* GetGlobalState() {
53
53
54
54
PyErr_Clear ();
55
55
try {
56
- py::module_::import (" google3.net.proto2.python.internal.cpp ._message" );
56
+ py::module_::import (" google.protobuf.pyext ._message" );
57
57
} catch (...) {
58
58
// TODO(pybind11-infra): narrow down to expected exception(s).
59
59
// Ignore any errors; they will appear immediately when the capsule
@@ -68,7 +68,7 @@ const GlobalState* GetGlobalState() {
68
68
// When not using fast protos, we may construct protos from the default
69
69
// pool.
70
70
try {
71
- auto m = py::module_::import (" google3.net.proto2.python.public " );
71
+ auto m = py::module_::import (" google.protobuf " );
72
72
state->global_pool = m.attr (" descriptor_pool" ).attr (" Default" )();
73
73
state->factory = m.attr (" message_factory" )
74
74
.attr (" MessageFactory" )(state->global_pool );
You can’t perform that action at this time.
0 commit comments