Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: third_party/protobuf/BUILD.gn

Issue 979643002: Fix the following browser_tests in the Linux GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/test/BUILD.gn ('K') | « ppapi/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/BUILD.gn
diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn
index 7c036ee5ecfc04c1b772c841ace5f0f0765bd853..215751359e75577318e39f1cf68d46f5c387ffe5 100644
--- a/third_party/protobuf/BUILD.gn
+++ b/third_party/protobuf/BUILD.gn
@@ -263,4 +263,69 @@ if (current_toolchain == host_toolchain) {
]
deps += [ "//build/config/sanitizers:deps" ]
}
+
+ copy("copy_google") {
+ sources = [
+ "__init__.py",
+ ]
+ outputs = [
+ "$root_gen_dir/google/{{source_file_part}}",
+ ]
+ }
+
+ copy("copy_google_protobuf") {
+ sources = [
+ "python/google/protobuf/__init__.py",
+ "python/google/protobuf/descriptor.py",
+ "python/google/protobuf/descriptor_database.py",
+ "python/google/protobuf/descriptor_pool.py",
+ "python/google/protobuf/message.py",
+ "python/google/protobuf/message_factory.py",
+ "python/google/protobuf/reflection.py",
+ "python/google/protobuf/service.py",
+ "python/google/protobuf/service_reflection.py",
+ "python/google/protobuf/text_format.py",
+
+ # TODO(ncarter): protoc"s python generator treats
+ # descriptor.proto specially, but it's not possible to trigger
+ # the special treatment unless you run protoc from ./src/src
+ # (the treatment is based on the path to the .proto file
+ # matching a constant exactly). I'm not sure how to convince
+ # gyp to execute a rule from a different directory. Until this
+ # is resolved, use a copy of descriptor_pb2.py that I manually
+ # generated.
+ "descriptor_pb2.py",
+ ]
+ outputs = [
+ "$root_gen_dir/google/protobuf/{{source_file_part}}",
+ ]
+ }
+
+ copy("copy_google_protobuf_internal") {
+ sources = [
+ "python/google/protobuf/internal/__init__.py",
+ "python/google/protobuf/internal/api_implementation.py",
+ "python/google/protobuf/internal/containers.py",
+ "python/google/protobuf/internal/cpp_message.py",
+ "python/google/protobuf/internal/decoder.py",
+ "python/google/protobuf/internal/encoder.py",
+ "python/google/protobuf/internal/enum_type_wrapper.py",
+ "python/google/protobuf/internal/generator_test.py",
+ "python/google/protobuf/internal/message_listener.py",
+ "python/google/protobuf/internal/python_message.py",
+ "python/google/protobuf/internal/type_checkers.py",
+ "python/google/protobuf/internal/wire_format.py",
+ ]
+ outputs = [
+ "$root_gen_dir/google/protobuf/internal/{{source_file_part}}",
+ ]
+ }
+
+ group("py_proto") {
+ public_deps = [
+ ":copy_google",
+ ":copy_google_protobuf",
+ ":copy_google_protobuf_internal",
+ ]
+ }
}
« chrome/test/BUILD.gn ('K') | « ppapi/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698