summaryrefslogtreecommitdiffstats
path: root/mojo/public/python/BUILD.gn
blob: 66f132f586523908d2f1ad5d8f531e82d04dc02b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//third_party/cython/rules.gni")

group("python") {
  deps = [
    ":base",
    ":bindings",
    ":system",
  ]
}

# GYP version: mojo.gyp:mojo_python_system
python_binary_module("system") {
  python_base_module = "mojo"
  sources = [
    "mojo/c_core.pxd",
    "mojo/c_environment.pxd",
    "mojo/system.pyx",
  ]
  additional_sources = [
    "src/python_system_helper.cc",
    "src/python_system_helper.h",
  ]
  deps = [
    "//mojo/public/c/environment",
    "//mojo/public/c/system:for_shared_library",
    "//mojo/public/cpp/environment:standalone",
    "//mojo/public/cpp/system",
    "//mojo/public/cpp/utility",
    "//mojo/public/cpp/bindings:callback",
    ":base",
  ]
}

copy("base") {
  sources = [
    "mojo/__init__.py",
  ]
  outputs = [
    "$root_out_dir/python/mojo/{{source_file_part}}",
  ]
}

# GYP version: mojo.gyp:mojo_python_bindings
copy("bindings") {
  sources = [
    "mojo/bindings/__init__.py",
    "mojo/bindings/descriptor.py",
    "mojo/bindings/messaging.py",
    "mojo/bindings/promise.py",
    "mojo/bindings/reflection.py",
    "mojo/bindings/serialization.py",
  ]
  outputs = [
    "$root_out_dir/python/mojo/bindings/{{source_file_part}}",
  ]
  deps = [
    ":base",
    ":system",
  ]
}