blob: 202d1fcaedd04125d4d8bad15a5ea6cc2135f10b [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001# 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.
4
Colin Blundellc0d8add2015-03-04 13:31:56 +01005import("//mojo/public/python/rules.gni")
James Robinson646469d2014-10-03 15:33:28 -07006import("//third_party/cython/rules.gni")
7
James Robinson646469d2014-10-03 15:33:28 -07008group("python") {
9 deps = [
Etienne Membrives9cbb6112015-01-08 14:20:50 +010010 ":mojo_embedder",
Colin Blundellc0d8add2015-03-04 13:31:56 +010011 ":packaged_utils",
12 ":utils",
Benjamin Lerman34edc092014-11-28 15:32:00 +010013 ":validation_util",
James Robinson646469d2014-10-03 15:33:28 -070014 "//mojo/public/python",
15 ]
16}
17
Colin Blundellc0d8add2015-03-04 13:31:56 +010018copy("utils") {
19 sources = [
20 "mojo_utils/__init__.py",
21 "mojo_utils/data_pipe_utils.py",
22 ]
23 outputs = [
24 "$root_out_dir/python/mojo_utils/{{source_file_part}}",
25 ]
26}
27
28python_package("packaged_utils") {
29 sources = [
30 "mojo_utils/__init__.py",
31 "mojo_utils/data_pipe_utils.py",
32 ]
33 datadeps = [
34 "//mojo/public/python:mojo_system",
35 ]
36}
37
Etienne Membrives9cbb6112015-01-08 14:20:50 +010038python_binary_module("mojo_embedder") {
Etienne Membrives9cbb6112015-01-08 14:20:50 +010039 cython_sources = [ "system/mojo_embedder.pyx" ]
James Robinson646469d2014-10-03 15:33:28 -070040 deps = [
Viet-Trung Luu30ef4b52015-12-10 13:49:06 -080041 "//mojo/edk/base_edk",
James Robinson646469d2014-10-03 15:33:28 -070042 "//mojo/edk/system",
43 ]
44 datadeps = [
Etienne Membrives9cbb6112015-01-08 14:20:50 +010045 "//mojo/public/python:mojo_system",
James Robinson646469d2014-10-03 15:33:28 -070046 ]
47}
Benjamin Lerman34edc092014-11-28 15:32:00 +010048
49copy("tests_module") {
50 sources = [
Etienne Membrives9cbb6112015-01-08 14:20:50 +010051 "system/mojo_tests/__init__.py",
Benjamin Lerman34edc092014-11-28 15:32:00 +010052 ]
53 outputs = [
Etienne Membrives9cbb6112015-01-08 14:20:50 +010054 "$root_out_dir/python/mojo_tests/{{source_file_part}}",
Benjamin Lerman34edc092014-11-28 15:32:00 +010055 ]
56}
57
58python_binary_module("validation_util") {
Etienne Membrives9cbb6112015-01-08 14:20:50 +010059 python_base_module = "mojo_tests"
60 cython_sources = [ "system/mojo_tests/validation_util.pyx" ]
Benjamin Lerman34edc092014-11-28 15:32:00 +010061 deps = [
62 "//mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils",
63 ]
64 datadeps = [
65 ":tests_module",
66 ]
67}