Skip to content

Commit

Permalink
Expose new python wrappers for C++ proto descriptor classes.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 594634311
  • Loading branch information
pybind11_protobuf authors authored and copybara-github committed Jan 1, 2024
1 parent 8359a09 commit df27249
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion pybind11_protobuf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand Down
16 changes: 8 additions & 8 deletions pybind11_protobuf/proto_cast_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@
#include <iostream>
#include <memory>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

#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;

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;
Expand Down

0 comments on commit df27249

Please sign in to comment.