OLD | NEW |
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 template("python_binary_module") { | 5 template("python_binary_module") { |
6 # Only available on linux for now. | 6 # Only available on linux for now. |
7 assert(is_linux) | 7 assert(is_linux) |
8 assert(defined(invoker.sources)) | 8 assert(defined(invoker.sources)) |
9 assert(defined(invoker.python_base_module)) | 9 assert(defined(invoker.python_base_module)) |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 deps += invoker.deps | 69 deps += invoker.deps |
70 } | 70 } |
71 if (defined(invoker.datadeps)) { | 71 if (defined(invoker.datadeps)) { |
72 datadeps = invoker.datadeps | 72 datadeps = invoker.datadeps |
73 } | 73 } |
74 sources = [ cython_output ] | 74 sources = [ cython_output ] |
75 if (defined(invoker.additional_sources)) { | 75 if (defined(invoker.additional_sources)) { |
76 sources += invoker.additional_sources | 76 sources += invoker.additional_sources |
77 } | 77 } |
78 configs += [ ":$config_name" ] | 78 configs += [ ":$config_name" ] |
| 79 if (defined(invoker.configs)) { |
| 80 configs += invoker.configs |
| 81 } |
79 } | 82 } |
80 | 83 |
81 copy(target_name) { | 84 copy(target_name) { |
82 python_base_module = invoker.python_base_module | 85 python_base_module = invoker.python_base_module |
83 sources = [ | 86 sources = [ |
84 "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_libr
ary_suffix}" | 87 "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_libr
ary_suffix}" |
85 ] | 88 ] |
86 outputs = [ | 89 outputs = [ |
87 "$root_out_dir/python/$python_base_module/${target_name}${python_module_su
ffix}" | 90 "$root_out_dir/python/$python_base_module/${target_name}${python_module_su
ffix}" |
88 ] | 91 ] |
89 deps = [ | 92 deps = [ |
90 ":$shared_library_name" | 93 ":$shared_library_name" |
91 ] | 94 ] |
92 } | 95 } |
93 } | 96 } |
OLD | NEW |