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