| Index: third_party/cython/rules.gni
|
| diff --git a/third_party/cython/rules.gni b/third_party/cython/rules.gni
|
| index 5cfea1ab45aa66210ef8e1a53eee927f5ac0bb90..04a9953e1df16b37b2f2901e1d829609b1b7f29c 100644
|
| --- a/third_party/cython/rules.gni
|
| +++ b/third_party/cython/rules.gni
|
| @@ -82,7 +82,8 @@ template("python_binary_module") {
|
| has_sources = defined(invoker.cython_sources) || defined(invoker.sources)
|
|
|
| assert(has_sources || defined(invoker.deps))
|
| - assert(defined(invoker.python_base_module))
|
| + assert(
|
| + !defined(invoker.python_base_module) || invoker.python_base_module != "")
|
|
|
| sources_target_name = target_name + "_cython_sources"
|
| shared_library_name = target_name + "_shared_library"
|
| @@ -138,12 +139,18 @@ template("python_binary_module") {
|
| }
|
|
|
| copy(target_name) {
|
| - python_base_module = invoker.python_base_module
|
| + if (defined(invoker.python_base_module)) {
|
| + python_base_module = invoker.python_base_module
|
| + output = "$root_out_dir/python/$python_base_module/${target_name}${python_module_suffix}"
|
| + } else {
|
| + output = "$root_out_dir/python/${target_name}${python_module_suffix}"
|
| + }
|
| +
|
| sources = [
|
| "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_library_suffix}",
|
| ]
|
| outputs = [
|
| - "$root_out_dir/python/$python_base_module/${target_name}${python_module_suffix}",
|
| + output,
|
| ]
|
| deps = [
|
| ":$shared_library_name",
|
|
|