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

Unified Diff: third_party/protobuf/BUILD.gn

Issue 1227393002: Add data files for base and net. Move GN Python proto outputs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « net/BUILD.gn ('k') | third_party/protobuf/proto_library.gni » ('j') | 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 d94a4cbc8a93bac02991d9a0d1556850b40f3941..0c57bd65c46710a94e5821bc09554f2893664092 100644
--- a/third_party/protobuf/BUILD.gn
+++ b/third_party/protobuf/BUILD.gn
@@ -265,12 +265,14 @@ if (current_toolchain == host_toolchain) {
}
}
+google_python_dir = "$root_out_dir/pyproto/google"
+
copy("copy_google") {
sources = [
"__init__.py",
]
outputs = [
- "$root_gen_dir/google/{{source_file_part}}",
+ "$google_python_dir/{{source_file_part}}",
]
}
@@ -298,7 +300,7 @@ copy("copy_google_protobuf") {
"descriptor_pb2.py",
]
outputs = [
- "$root_gen_dir/google/protobuf/{{source_file_part}}",
+ "$google_python_dir/protobuf/{{source_file_part}}",
]
}
@@ -318,7 +320,7 @@ copy("copy_google_protobuf_internal") {
"python/google/protobuf/internal/wire_format.py",
]
outputs = [
- "$root_gen_dir/google/protobuf/internal/{{source_file_part}}",
+ "$google_python_dir/protobuf/internal/{{source_file_part}}",
]
}
@@ -328,4 +330,9 @@ group("py_proto") {
":copy_google_protobuf",
":copy_google_protobuf_internal",
]
+
+ # Targets that depend on this should depend on the copied data files.
+ data = get_target_outputs(":copy_google")
+ data += get_target_outputs(":copy_google_protobuf")
+ data += get_target_outputs(":copy_google_protobuf_internal")
}
« no previous file with comments | « net/BUILD.gn ('k') | third_party/protobuf/proto_library.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698