xref: /aosp_15_r20/external/pigweed/pw_ide/py/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2024 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15load("@rules_python//python:defs.bzl", "py_library")
16load("//pw_build:python.bzl", "pw_py_binary", "pw_py_test")
17
18package(default_visibility = ["//visibility:public"])
19
20py_library(
21    name = "pw_ide",
22    srcs = [
23        "pw_ide/__init__.py",
24        "pw_ide/activate.py",
25        "pw_ide/cli.py",
26        "pw_ide/commands.py",
27        "pw_ide/cpp.py",
28        "pw_ide/editors.py",
29        "pw_ide/exceptions.py",
30        "pw_ide/python.py",
31        "pw_ide/settings.py",
32        "pw_ide/symlinks.py",
33        "pw_ide/vscode.py",
34    ],
35    data = [
36        "pw_ide/py.typed",
37    ],
38    imports = ["."],
39    deps = [
40        "//pw_cli/py:pw_cli",
41        "//pw_config_loader/py:pw_config_loader",
42        "@python_packages//json5",
43    ],
44)
45
46pw_py_binary(
47    name = "pw_ide_cli",
48    srcs = ["pw_ide/__main__.py"],
49    main = "pw_ide/__main__.py",
50    deps = [
51        ":pw_ide",
52    ],
53)
54
55pw_py_test(
56    name = "commands_test",
57    size = "small",
58    srcs = [
59        "commands_test.py",
60        "test_cases.py",
61    ],
62    deps = [":pw_ide"],
63)
64
65pw_py_test(
66    name = "cpp_test",
67    size = "small",
68    srcs = [
69        "cpp_test.py",
70        "test_cases.py",
71    ],
72    deps = [":pw_ide"],
73)
74
75pw_py_test(
76    name = "cpp_test_fake_env",
77    size = "small",
78    srcs = ["cpp_test_fake_env.py"],
79    deps = [":pw_ide"],
80)
81
82pw_py_test(
83    name = "editors_test",
84    size = "small",
85    srcs = [
86        "editors_test.py",
87        "test_cases.py",
88    ],
89    deps = [":pw_ide"],
90)
91
92pw_py_test(
93    name = "vscode_test",
94    size = "small",
95    srcs = [
96        "test_cases.py",
97        "vscode_test.py",
98    ],
99    deps = [":pw_ide"],
100)
101