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

Side by Side Diff: mojo/public/python/BUILD.gn

Issue 1413343006: Break the circular dependency in the new mojom bindings generation pipeline. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("../mojo_sdk.gni") 5 import("../mojo_sdk.gni")
6 import("//third_party/cython/rules.gni") 6 import("//third_party/cython/rules.gni")
7 import("rules.gni") 7 import("rules.gni")
8 8
9 group("python") { 9 group("python") {
10 deps = [ 10 deps = [
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 python_package("packaged_application") { 82 python_package("packaged_application") {
83 sources = [ 83 sources = [
84 "mojo_application/__init__.py", 84 "mojo_application/__init__.py",
85 "mojo_application/application_delegate.py", 85 "mojo_application/application_delegate.py",
86 "mojo_application/application_impl.py", 86 "mojo_application/application_impl.py",
87 "mojo_application/application_runner.py", 87 "mojo_application/application_runner.py",
88 "mojo_application/service_provider_impl.py", 88 "mojo_application/service_provider_impl.py",
89 ] 89 ]
90 } 90 }
91 91
92 action("import_interface_bindings") { 92 action("import_interface_bindings") {
rudominer 2015/11/06 23:07:25 I know you did not really touch this target but if
93 visibility = [ ":bindings" ] 93 visibility = [ ":bindings" ]
94 script = rebase_path("mojo/public/tools/gn/unzip.py", ".", mojo_root) 94 script = rebase_path("mojo/public/tools/gn/unzip.py", ".", mojo_root)
95 timestamp = "$target_gen_dir/${target_name}.outputstamp" 95 timestamp = "$target_gen_dir/${target_name}.outputstamp"
96 mojom_deps = [ "../interfaces/bindings:bindings_python" ] 96 mojom_deps = [ "../interfaces/bindings:bindings_python" ]
97 inputs = [] 97 inputs = []
98 foreach(d, mojom_deps) { 98 foreach(d, mojom_deps) {
99 dep_name = get_label_info(d, "name") 99 dep_name = get_label_info(d, "name")
100 dep_target_out_dir = get_label_info(d, "target_out_dir") 100 dep_target_out_dir = get_label_info(d, "target_out_dir")
101 inputs += [ "$dep_target_out_dir/$dep_name.pyzip" ] 101 inputs += [ "$dep_target_out_dir/$dep_name.pyzip" ]
102 } 102 }
103 outputs = [ 103 outputs = [
104 timestamp, 104 timestamp,
105 ] 105 ]
106 rebase_inputs = rebase_path(inputs, root_build_dir) 106 rebase_inputs = rebase_path(inputs, root_build_dir)
107 rabase_output = rebase_path("$root_out_dir/python", root_build_dir) 107 rabase_output = rebase_path("$root_out_dir/python", root_build_dir)
108 rebase_timestamp = rebase_path(timestamp, root_build_dir) 108 rebase_timestamp = rebase_path(timestamp, root_build_dir)
109 args = [ 109 args = [
110 "--inputs=${rebase_inputs}", 110 "--inputs=${rebase_inputs}",
111 "--output=${rabase_output}", 111 "--output=${rabase_output}",
112 "--timestamp=${rebase_timestamp}", 112 "--timestamp=${rebase_timestamp}",
113 ] 113 ]
114 114
115 deps = mojom_deps 115 deps = mojom_deps
116 } 116 }
117 117
118 copy("bindings") { 118 group("bindings") {
rudominer 2015/11/06 23:07:25 This target is depended on by the "python" target.
azani 2015/11/06 23:39:00 Sorry, this should depend on serialization_binding
119 deps = [
rudominer 2015/11/06 23:07:25 should this target depend on :mojo_system_impl? Or
azani 2015/11/06 23:39:00 I don't know. I think that in practice, yes, you w
120 ":import_interface_bindings",
121 ]
122 }
123
124 # This target lists dependencies for mojom serialization only.
rudominer 2015/11/06 23:07:25 Could you add one more sentence fleshing this out
azani 2015/11/06 23:39:00 Done.
125 copy("serialization_bindings") {
119 sources = [ 126 sources = [
120 "mojo_bindings/__init__.py", 127 "mojo_bindings/__init__.py",
121 "mojo_bindings/descriptor.py", 128 "mojo_bindings/descriptor.py",
122 "mojo_bindings/interface_reflection.py", 129 "mojo_bindings/interface_reflection.py",
123 "mojo_bindings/messaging.py", 130 "mojo_bindings/messaging.py",
124 "mojo_bindings/promise.py", 131 "mojo_bindings/promise.py",
125 "mojo_bindings/reflection.py", 132 "mojo_bindings/reflection.py",
126 "mojo_bindings/serialization.py", 133 "mojo_bindings/serialization.py",
127 ] 134 ]
128 outputs = [ 135 outputs = [
129 "$root_out_dir/python/mojo_bindings/{{source_file_part}}", 136 "$root_out_dir/python/mojo_bindings/{{source_file_part}}",
130 ] 137 ]
131 deps = [ 138 deps = [
132 ":import_interface_bindings",
133 ":mojo_system", 139 ":mojo_system",
134 ] 140 ]
135 } 141 }
136 142
137 python_package("packaged_bindings") { 143 python_package("packaged_bindings") {
138 sources = [ 144 sources = [
139 "mojo_bindings/__init__.py", 145 "mojo_bindings/__init__.py",
140 "mojo_bindings/descriptor.py", 146 "mojo_bindings/descriptor.py",
141 "mojo_bindings/interface_reflection.py", 147 "mojo_bindings/interface_reflection.py",
142 "mojo_bindings/messaging.py", 148 "mojo_bindings/messaging.py",
143 "mojo_bindings/promise.py", 149 "mojo_bindings/promise.py",
144 "mojo_bindings/reflection.py", 150 "mojo_bindings/reflection.py",
145 "mojo_bindings/serialization.py", 151 "mojo_bindings/serialization.py",
146 ] 152 ]
147 153
148 deps = [ 154 deps = [
149 "../interfaces/bindings:bindings_python", 155 "../interfaces/bindings:bindings_python",
150 ] 156 ]
151 } 157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698