James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 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. |
| 4 | |
Colin Blundell | c0d8add | 2015-03-04 13:31:56 +0100 | [diff] [blame] | 5 | import("//mojo/public/python/rules.gni") |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 6 | import("//third_party/cython/rules.gni") |
| 7 | |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 8 | group("python") { |
| 9 | deps = [ |
Etienne Membrives | 9cbb611 | 2015-01-08 14:20:50 +0100 | [diff] [blame] | 10 | ":mojo_embedder", |
Colin Blundell | c0d8add | 2015-03-04 13:31:56 +0100 | [diff] [blame] | 11 | ":packaged_utils", |
| 12 | ":utils", |
Benjamin Lerman | 34edc09 | 2014-11-28 15:32:00 +0100 | [diff] [blame] | 13 | ":validation_util", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 14 | "//mojo/public/python", |
| 15 | ] |
| 16 | } |
| 17 | |
Colin Blundell | c0d8add | 2015-03-04 13:31:56 +0100 | [diff] [blame] | 18 | copy("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 | |
| 28 | python_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 Membrives | 9cbb611 | 2015-01-08 14:20:50 +0100 | [diff] [blame] | 38 | python_binary_module("mojo_embedder") { |
Etienne Membrives | 9cbb611 | 2015-01-08 14:20:50 +0100 | [diff] [blame] | 39 | cython_sources = [ "system/mojo_embedder.pyx" ] |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 40 | deps = [ |
Viet-Trung Luu | 30ef4b5 | 2015-12-10 13:49:06 -0800 | [diff] [blame] | 41 | "//mojo/edk/base_edk", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 42 | "//mojo/edk/system", |
| 43 | ] |
| 44 | datadeps = [ |
Etienne Membrives | 9cbb611 | 2015-01-08 14:20:50 +0100 | [diff] [blame] | 45 | "//mojo/public/python:mojo_system", |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 46 | ] |
| 47 | } |
Benjamin Lerman | 34edc09 | 2014-11-28 15:32:00 +0100 | [diff] [blame] | 48 | |
| 49 | copy("tests_module") { |
| 50 | sources = [ |
Etienne Membrives | 9cbb611 | 2015-01-08 14:20:50 +0100 | [diff] [blame] | 51 | "system/mojo_tests/__init__.py", |
Benjamin Lerman | 34edc09 | 2014-11-28 15:32:00 +0100 | [diff] [blame] | 52 | ] |
| 53 | outputs = [ |
Etienne Membrives | 9cbb611 | 2015-01-08 14:20:50 +0100 | [diff] [blame] | 54 | "$root_out_dir/python/mojo_tests/{{source_file_part}}", |
Benjamin Lerman | 34edc09 | 2014-11-28 15:32:00 +0100 | [diff] [blame] | 55 | ] |
| 56 | } |
| 57 | |
| 58 | python_binary_module("validation_util") { |
Etienne Membrives | 9cbb611 | 2015-01-08 14:20:50 +0100 | [diff] [blame] | 59 | python_base_module = "mojo_tests" |
| 60 | cython_sources = [ "system/mojo_tests/validation_util.pyx" ] |
Benjamin Lerman | 34edc09 | 2014-11-28 15:32:00 +0100 | [diff] [blame] | 61 | deps = [ |
| 62 | "//mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils", |
| 63 | ] |
| 64 | datadeps = [ |
| 65 | ":tests_module", |
| 66 | ] |
| 67 | } |