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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 deps = [ | 65 deps = [ |
66 ":$generator_target_name", | 66 ":$generator_target_name", |
67 ] | 67 ] |
68 if (defined(invoker.deps)) { | 68 if (defined(invoker.deps)) { |
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)) { |
| 76 sources += invoker.additional_sources |
| 77 } |
75 configs += [ ":$config_name" ] | 78 configs += [ ":$config_name" ] |
76 } | 79 } |
77 | 80 |
78 copy(target_name) { | 81 copy(target_name) { |
79 python_base_module = invoker.python_base_module | 82 python_base_module = invoker.python_base_module |
80 sources = [ | 83 sources = [ |
81 "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_libr
ary_suffix}" | 84 "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_libr
ary_suffix}" |
82 ] | 85 ] |
83 outputs = [ | 86 outputs = [ |
84 "$root_out_dir/python/$python_base_module/${target_name}${python_module_su
ffix}" | 87 "$root_out_dir/python/$python_base_module/${target_name}${python_module_su
ffix}" |
85 ] | 88 ] |
86 deps = [ | 89 deps = [ |
87 ":$shared_library_name" | 90 ":$shared_library_name" |
88 ] | 91 ] |
89 } | 92 } |
90 } | 93 } |
OLD | NEW |