Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: mojo/public/python/BUILD.gn

Issue 792843002: Refactor the python system_impl module. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 sources = [ 19 sources = [
20 "mojo/c_core.pxd", 20 "mojo/c_core.pxd",
21 "mojo/c_environment_common.pxd",
21 "mojo/system.pyx", 22 "mojo/system.pyx",
22 ] 23 ]
23 configs = [ "../build/config:mojo_sdk" ]
qsr 2014/12/10 15:38:57 You need to keep those.
etiennej 2014/12/11 09:52:52 Done.
24 deps = [ 24 deps = [
25 ":base", 25 ":base",
26 "../c/environment", 26 "../c/environment",
27 "../c/system:for_shared_library", 27 "../c/system:for_shared_library",
28 "../cpp/environment:standalone", 28 "../cpp/environment:standalone",
29 "../cpp/system", 29 "../cpp/system",
30 "../cpp/utility", 30 "../cpp/utility",
31 "../cpp/bindings:callback", 31 "../cpp/bindings:callback",
32 ] 32 ]
33 } 33 }
34 34
35 python_binary_module_sources("system_src") {
qsr 2014/12/10 15:38:57 why are the dependencies different for this one an
etiennej 2014/12/11 09:52:52 Done.
36 sources = [
37 "mojo/c_core.pxd",
38 "mojo/c_environment_common.pxd",
39 "mojo/system.pyx",
40 ]
41 deps = [
42 ":base",
43 "../c/system:for_shared_library",
44 "../cpp/system",
45 "../cpp/utility",
46 "../cpp/bindings:callback",
47 ]
48 }
49
35 python_binary_module("system_impl") { 50 python_binary_module("system_impl") {
36 python_base_module = "mojo" 51 python_base_module = "mojo"
37 sources = [ 52 sources = [
38 "mojo/c_core.pxd", 53 "mojo/c_core.pxd",
39 "mojo/c_environment.pxd", 54 "mojo/c_environment.pxd",
40 "mojo/system_impl.pyx", 55 "mojo/system_impl.pyx",
41 ] 56 ]
42 additional_sources = [ 57 additional_sources = [
43 "src/python_system_helper.cc", 58 "src/python_system_helper.cc",
44 "src/python_system_helper.h", 59 "src/python_system_helper.h",
45 ] 60 ]
46 configs = [ "../build/config:mojo_sdk" ]
47 deps = [ 61 deps = [
48 ":base", 62 ":base",
63 ":python_common",
49 "../c/environment", 64 "../c/environment",
50 "../c/system:for_shared_library", 65 "../c/system:for_shared_library",
51 "../cpp/environment:standalone", 66 "../cpp/environment:standalone",
52 "../cpp/system", 67 "../cpp/system",
53 "../cpp/utility", 68 "../cpp/utility",
54 "../cpp/bindings:callback", 69 "../cpp/bindings:callback",
55 ] 70 ]
56 } 71 }
57 72
73 source_set("python_common") {
74 sources = [
75 "src/common.h",
76 "src/common.cc",
77 ]
78 deps = [
79 "../c/environment:environment",
80 "../cpp/bindings:callback",
81 "../cpp/environment:environment",
82 "../cpp/system:system",
83 "../cpp/utility",
84 ]
85 include_dirs = [ "/usr/include/python2.7" ]
qsr 2014/12/10 15:38:57 That's incorrect. You need to work with the rules.
etiennej 2014/12/11 09:52:52 Done.
86 }
87
58 copy("base") { 88 copy("base") {
59 sources = [ 89 sources = [
60 "mojo/__init__.py", 90 "mojo/__init__.py",
61 ] 91 ]
62 outputs = [ 92 outputs = [
63 "$root_out_dir/python/mojo/{{source_file_part}}", 93 "$root_out_dir/python/mojo/{{source_file_part}}",
64 ] 94 ]
65 } 95 }
66 96
67 # GYP version: mojo.gyp:mojo_python_bindings 97 # GYP version: mojo.gyp:mojo_python_bindings
68 copy("bindings") { 98 copy("bindings") {
69 sources = [ 99 sources = [
70 "mojo/bindings/__init__.py", 100 "mojo/bindings/__init__.py",
71 "mojo/bindings/descriptor.py", 101 "mojo/bindings/descriptor.py",
72 "mojo/bindings/messaging.py", 102 "mojo/bindings/messaging.py",
73 "mojo/bindings/promise.py", 103 "mojo/bindings/promise.py",
74 "mojo/bindings/reflection.py", 104 "mojo/bindings/reflection.py",
75 "mojo/bindings/serialization.py", 105 "mojo/bindings/serialization.py",
76 ] 106 ]
77 outputs = [ 107 outputs = [
78 "$root_out_dir/python/mojo/bindings/{{source_file_part}}", 108 "$root_out_dir/python/mojo/bindings/{{source_file_part}}",
79 ] 109 ]
80 deps = [ 110 deps = [
81 ":base", 111 ":base",
82 ":system", 112 ":system",
83 ] 113 ]
84 } 114 }
OLDNEW
« no previous file with comments | « no previous file | mojo/public/python/mojo/c_environment.pxd » ('j') | mojo/public/python/mojo/system_impl.pyx » ('J')

Powered by Google App Engine
This is Rietveld 408576698