| 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("//third_party/cython/rules.gni") | 5 import("//third_party/cython/rules.gni") |
| 6 | 6 |
| 7 group("python") { | 7 group("python") { |
| 8 deps = [ | 8 deps = [ |
| 9 ":base", | |
| 10 ":bindings", | 9 ":bindings", |
| 11 ":system", | 10 ":mojo_system", |
| 12 ":system_impl", | 11 ":mojo_system_impl", |
| 13 ] | 12 ] |
| 14 } | 13 } |
| 15 | 14 |
| 16 # GYP version: mojo.gyp:mojo_python_system | 15 # GYP version: mojo.gyp:mojo_python_system |
| 17 python_binary_module("system") { | 16 python_binary_module("mojo_system") { |
| 18 python_base_module = "mojo" | |
| 19 configs = [ "../build/config:mojo_sdk" ] | 17 configs = [ "../build/config:mojo_sdk" ] |
| 20 deps = [ | 18 deps = [ |
| 21 ":system_embedded", | 19 ":system_embedded", |
| 22 ] | 20 ] |
| 23 } | 21 } |
| 24 | 22 |
| 25 python_binary_source_set("system_embedded") { | 23 python_binary_source_set("system_embedded") { |
| 26 cython_sources = [ | 24 cython_sources = [ |
| 27 "mojo/c_async_waiter.pxd", | 25 "c_async_waiter.pxd", |
| 28 "mojo/c_core.pxd", | 26 "c_core.pxd", |
| 29 "mojo/c_export.pxd", | 27 "c_export.pxd", |
| 30 "mojo/c_thunks.pxd", | 28 "c_thunks.pxd", |
| 31 "mojo/system.pyx", | 29 "mojo_system.pyx", |
| 32 ] | 30 ] |
| 33 configs = [ "../build/config:mojo_sdk" ] | 31 configs = [ "../build/config:mojo_sdk" ] |
| 34 deps = [ | 32 deps = [ |
| 35 ":base", | |
| 36 "../c/system", | 33 "../c/system", |
| 37 "../cpp/bindings:callback", | 34 "../cpp/bindings:callback", |
| 38 "../cpp/system", | 35 "../cpp/system", |
| 39 "../cpp/utility", | 36 "../cpp/utility", |
| 40 "../platform/native:system", | 37 "../platform/native:system", |
| 41 ] | 38 ] |
| 42 } | 39 } |
| 43 | 40 |
| 44 python_binary_module("system_impl") { | 41 python_binary_module("mojo_system_impl") { |
| 45 python_base_module = "mojo" | |
| 46 cython_sources = [ | 42 cython_sources = [ |
| 47 "mojo/c_environment.pxd", | 43 "c_environment.pxd", |
| 48 "mojo/c_export.pxd", | 44 "c_export.pxd", |
| 49 "mojo/c_thunks.pxd", | 45 "c_thunks.pxd", |
| 50 "mojo/system_impl.pyx", | 46 "mojo_system_impl.pyx", |
| 51 ] | 47 ] |
| 52 sources = [ | 48 sources = [ |
| 53 "src/python_system_helper.cc", | 49 "src/python_system_helper.cc", |
| 54 "src/python_system_helper.h", | 50 "src/python_system_helper.h", |
| 55 ] | 51 ] |
| 56 configs = [ "../build/config:mojo_sdk" ] | 52 configs = [ "../build/config:mojo_sdk" ] |
| 57 deps = [ | 53 deps = [ |
| 58 ":base", | |
| 59 ":python_common", | 54 ":python_common", |
| 60 "../c/environment", | 55 "../c/environment", |
| 61 "../c/system", | 56 "../c/system", |
| 62 "../cpp/bindings:callback", | 57 "../cpp/bindings:callback", |
| 63 "../cpp/environment:standalone", | 58 "../cpp/environment:standalone", |
| 64 "../cpp/system", | 59 "../cpp/system", |
| 65 "../cpp/utility", | 60 "../cpp/utility", |
| 66 "../platform/native:system", | 61 "../platform/native:system", |
| 67 ] | 62 ] |
| 68 } | 63 } |
| 69 | 64 |
| 70 python_binary_source_set("python_common") { | 65 python_binary_source_set("python_common") { |
| 71 sources = [ | 66 sources = [ |
| 72 "src/common.cc", | 67 "src/common.cc", |
| 73 "src/common.h", | 68 "src/common.h", |
| 74 ] | 69 ] |
| 75 configs = [ "../build/config:mojo_sdk" ] | 70 configs = [ "../build/config:mojo_sdk" ] |
| 76 deps = [ | 71 deps = [ |
| 77 "../c/environment:environment", | 72 "../c/environment:environment", |
| 78 "../cpp/bindings:callback", | 73 "../cpp/bindings:callback", |
| 79 "../cpp/environment:environment", | 74 "../cpp/environment:environment", |
| 80 "../cpp/system:system", | 75 "../cpp/system:system", |
| 81 "../cpp/utility", | 76 "../cpp/utility", |
| 82 ] | 77 ] |
| 83 } | 78 } |
| 84 | 79 |
| 85 copy("base") { | |
| 86 sources = [ | |
| 87 "mojo/__init__.py", | |
| 88 ] | |
| 89 outputs = [ | |
| 90 "$root_out_dir/python/mojo/{{source_file_part}}", | |
| 91 ] | |
| 92 } | |
| 93 | |
| 94 # GYP version: mojo.gyp:mojo_python_bindings | 80 # GYP version: mojo.gyp:mojo_python_bindings |
| 95 copy("bindings") { | 81 copy("bindings") { |
| 96 sources = [ | 82 sources = [ |
| 97 "mojo/bindings/__init__.py", | 83 "mojo_bindings/__init__.py", |
| 98 "mojo/bindings/descriptor.py", | 84 "mojo_bindings/descriptor.py", |
| 99 "mojo/bindings/messaging.py", | 85 "mojo_bindings/messaging.py", |
| 100 "mojo/bindings/promise.py", | 86 "mojo_bindings/promise.py", |
| 101 "mojo/bindings/reflection.py", | 87 "mojo_bindings/reflection.py", |
| 102 "mojo/bindings/serialization.py", | 88 "mojo_bindings/serialization.py", |
| 103 ] | 89 ] |
| 104 outputs = [ | 90 outputs = [ |
| 105 "$root_out_dir/python/mojo/bindings/{{source_file_part}}", | 91 "$root_out_dir/python/mojo_bindings/{{source_file_part}}", |
| 106 ] | 92 ] |
| 107 deps = [ | 93 deps = [ |
| 108 ":base", | 94 ":mojo_system", |
| 109 ":system", | |
| 110 ] | 95 ] |
| 111 } | 96 } |
| OLD | NEW |