| 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 import("//build/toolchain/toolchain.gni") |
| 6 |
| 5 template("python_binary_source_set") { | 7 template("python_binary_source_set") { |
| 6 # Only available on linux for now. | 8 # Only available on linux for now. |
| 7 assert(is_linux) | 9 assert(is_linux) |
| 8 assert(defined(invoker.cython_sources) || defined(invoker.sources)) | 10 assert(defined(invoker.cython_sources) || defined(invoker.sources)) |
| 9 | 11 |
| 10 config_name = target_name + "_python_config" | 12 config_name = target_name + "_python_config" |
| 11 | 13 |
| 12 target_visibility = [ ":$target_name" ] | 14 target_visibility = [ ":$target_name" ] |
| 13 | 15 |
| 14 if (defined(invoker.cython_sources)) { | 16 if (defined(invoker.cython_sources)) { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 144 |
| 143 copy(target_name) { | 145 copy(target_name) { |
| 144 if (defined(invoker.python_base_module)) { | 146 if (defined(invoker.python_base_module)) { |
| 145 python_base_module = invoker.python_base_module | 147 python_base_module = invoker.python_base_module |
| 146 output = "$root_out_dir/python/$python_base_module/${target_name}${python_
module_suffix}" | 148 output = "$root_out_dir/python/$python_base_module/${target_name}${python_
module_suffix}" |
| 147 } else { | 149 } else { |
| 148 output = "$root_out_dir/python/${target_name}${python_module_suffix}" | 150 output = "$root_out_dir/python/${target_name}${python_module_suffix}" |
| 149 } | 151 } |
| 150 | 152 |
| 151 sources = [ | 153 sources = [ |
| 152 "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_libr
ary_suffix}", | 154 "$root_shlib_dir/${shared_library_prefix}${shared_library_name}${shared_li
brary_suffix}", |
| 153 ] | 155 ] |
| 154 outputs = [ | 156 outputs = [ |
| 155 output, | 157 output, |
| 156 ] | 158 ] |
| 157 deps = [ | 159 deps = [ |
| 158 ":$shared_library_name", | 160 ":$shared_library_name", |
| 159 ] | 161 ] |
| 160 } | 162 } |
| 161 } | 163 } |
| OLD | NEW |