diff --git a/pybind11_protobuf/BUILD b/pybind11_protobuf/BUILD index 528db9e..a819c8a 100644 --- a/pybind11_protobuf/BUILD +++ b/pybind11_protobuf/BUILD @@ -58,11 +58,15 @@ pybind_library( }), deps = [ ":check_unknown_fields", + "//third_party/protobuf", + "//third_party/py/google/protobuf:proto_api", "@com_google_absl//absl/container:flat_hash_map", + "@com_google_absl//absl/log", + "@com_google_absl//absl/log:check", + "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", "@com_google_protobuf//:protobuf", - "@com_google_protobuf//python:proto_api", ], ) diff --git a/pybind11_protobuf/proto_cast_util.cc b/pybind11_protobuf/proto_cast_util.cc index a634429..cd4ffb1 100644 --- a/pybind11_protobuf/proto_cast_util.cc +++ b/pybind11_protobuf/proto_cast_util.cc @@ -9,20 +9,21 @@ #include #include #include -#include #include +#include #include "google/protobuf/descriptor.pb.h" -#include "google/protobuf/descriptor.h" -#include "google/protobuf/dynamic_message.h" -#include "google/protobuf/message.h" -#include "python/google/protobuf/proto_api.h" #include "absl/container/flat_hash_map.h" -#include "absl/strings/numbers.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/memory/memory.h" #include "absl/strings/str_replace.h" -#include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" +#include "third_party/protobuf/descriptor.h" +#include "third_party/protobuf/descriptor_database.h" +#include "third_party/protobuf/dynamic_message.h" +#include "third_party/py/google/protobuf/proto_api.h" #include "pybind11_protobuf/check_unknown_fields.h" namespace py = pybind11; @@ -30,7 +31,6 @@ namespace py = pybind11; using ::google::protobuf::Descriptor; using ::google::protobuf::DescriptorDatabase; using ::google::protobuf::DescriptorPool; -using ::google::protobuf::DescriptorProto; using ::google::protobuf::DynamicMessageFactory; using ::google::protobuf::FileDescriptor; using ::google::protobuf::FileDescriptorProto;