• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 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
20licenses(["notice"])
21
22py_library(
23    name = "pw_cli",
24    srcs = [
25        "pw_cli/__init__.py",
26        "pw_cli/__main__.py",
27        "pw_cli/aliases.py",
28        "pw_cli/allowed_caller.py",
29        "pw_cli/argument_types.py",
30        "pw_cli/arguments.py",
31        "pw_cli/branding.py",
32        "pw_cli/collect_files.py",
33        "pw_cli/color.py",
34        "pw_cli/decorators.py",
35        "pw_cli/diff.py",
36        "pw_cli/env.py",
37        "pw_cli/envparse.py",
38        "pw_cli/file_filter.py",
39        "pw_cli/find_config.py",
40        "pw_cli/git_repo.py",
41        "pw_cli/interactive_prompts.py",
42        "pw_cli/log.py",
43        "pw_cli/pigweed_aliases.py",
44        "pw_cli/plugins.py",
45        "pw_cli/plural.py",
46        "pw_cli/process.py",
47        "pw_cli/pw_command_plugins.py",
48        "pw_cli/requires.py",
49        "pw_cli/status_reporter.py",
50        "pw_cli/tool_runner.py",
51    ],
52    imports = ["."],
53    deps = [
54        "@python_packages//prompt_toolkit",
55        "@python_packages//psutil",
56    ],
57)
58
59pw_py_binary(
60    name = "log",
61    srcs = [
62        "pw_cli/log.py",
63    ],
64    deps = [
65        ":pw_cli",
66    ],
67)
68
69pw_py_test(
70    name = "envparse_test",
71    size = "small",
72    srcs = [
73        "envparse_test.py",
74    ],
75    deps = [
76        ":pw_cli",
77    ],
78)
79
80pw_py_test(
81    name = "file_filter_test",
82    size = "small",
83    srcs = [
84        "file_filter_test.py",
85    ],
86    deps = [
87        ":pw_cli",
88    ],
89)
90
91pw_py_test(
92    name = "find_config_test",
93    size = "small",
94    srcs = [
95        "find_config_test.py",
96    ],
97    deps = [
98        ":pw_cli",
99        "@python_packages//pyfakefs",
100    ],
101)
102
103pw_py_test(
104    name = "git_repo_test",
105    size = "small",
106    srcs = [
107        "git_repo_test.py",
108    ],
109    deps = [
110        ":pw_cli",
111        "@python_packages//pyfakefs",
112    ],
113)
114
115pw_py_test(
116    name = "plugins_test",
117    size = "small",
118    srcs = [
119        "plugins_test.py",
120    ],
121    deps = [
122        ":pw_cli",
123    ],
124)
125
126pw_py_test(
127    name = "plural_test",
128    size = "small",
129    srcs = [
130        "plural_test.py",
131    ],
132    deps = [
133        ":pw_cli",
134    ],
135)
136
137pw_py_test(
138    name = "tool_runner_test",
139    size = "small",
140    srcs = [
141        "tool_runner_test.py",
142    ],
143    deps = [
144        ":pw_cli",
145    ],
146)
147