base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON().
[chromium-blink-merge.git] / mojo / public / python / BUILD.gn
blob6c396be396a642274c4984167c028c3c8a014838
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
3 # found in the LICENSE file.
5 import("//third_party/cython/rules.gni")
7 group("python") {
8   deps = [
9     ":base",
10     ":bindings",
11     ":system",
12     ":system_impl",
13   ]
16 # GYP version: mojo.gyp:mojo_python_system
17 python_binary_module("system") {
18   python_base_module = "mojo"
19   configs = [ "../build/config:mojo_sdk" ]
20   deps = [
21     ":system_embedded",
22   ]
25 python_binary_source_set("system_embedded") {
26   cython_sources = [
27     "mojo/c_async_waiter.pxd",
28     "mojo/c_core.pxd",
29     "mojo/c_export.pxd",
30     "mojo/c_thunks.pxd",
31     "mojo/system.pyx",
32   ]
33   configs = [ "../build/config:mojo_sdk" ]
34   deps = [
35     ":base",
36     "../c/system",
37     "../cpp/bindings:callback",
38     "../cpp/system",
39     "../cpp/utility",
40     "../platform/native:system",
41   ]
44 python_binary_module("system_impl") {
45   python_base_module = "mojo"
46   cython_sources = [
47     "mojo/c_environment.pxd",
48     "mojo/c_export.pxd",
49     "mojo/c_thunks.pxd",
50     "mojo/system_impl.pyx",
51   ]
52   sources = [
53     "src/python_system_helper.cc",
54     "src/python_system_helper.h",
55   ]
56   configs = [ "../build/config:mojo_sdk" ]
57   deps = [
58     ":base",
59     ":python_common",
60     "../c/environment",
61     "../c/system",
62     "../cpp/bindings:callback",
63     "../cpp/environment:standalone",
64     "../cpp/system",
65     "../cpp/utility",
66     "../platform/native:system",
67   ]
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   ]
85 copy("base") {
86   sources = [
87     "mojo/__init__.py",
88   ]
89   outputs = [
90     "$root_out_dir/python/mojo/{{source_file_part}}",
91   ]
94 # GYP version: mojo.gyp:mojo_python_bindings
95 copy("bindings") {
96   sources = [
97     "mojo/bindings/__init__.py",
98     "mojo/bindings/descriptor.py",
99     "mojo/bindings/messaging.py",
100     "mojo/bindings/promise.py",
101     "mojo/bindings/reflection.py",
102     "mojo/bindings/serialization.py",
103   ]
104   outputs = [
105     "$root_out_dir/python/mojo/bindings/{{source_file_part}}",
106   ]
107   deps = [
108     ":base",
109     ":system",
110   ]