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/color.py", 33 "pw_cli/decorators.py", 34 "pw_cli/diff.py", 35 "pw_cli/env.py", 36 "pw_cli/envparse.py", 37 "pw_cli/file_filter.py", 38 "pw_cli/git_repo.py", 39 "pw_cli/interactive_prompts.py", 40 "pw_cli/log.py", 41 "pw_cli/pigweed_aliases.py", 42 "pw_cli/plugins.py", 43 "pw_cli/plural.py", 44 "pw_cli/process.py", 45 "pw_cli/pw_command_plugins.py", 46 "pw_cli/requires.py", 47 "pw_cli/status_reporter.py", 48 "pw_cli/tool_runner.py", 49 ], 50 imports = ["."], 51 deps = [ 52 "@python_packages//prompt_toolkit", 53 "@python_packages//psutil", 54 ], 55) 56 57pw_py_binary( 58 name = "log", 59 srcs = [ 60 "pw_cli/log.py", 61 ], 62 deps = [ 63 ":pw_cli", 64 ], 65) 66 67pw_py_test( 68 name = "envparse_test", 69 size = "small", 70 srcs = [ 71 "envparse_test.py", 72 ], 73 deps = [ 74 ":pw_cli", 75 ], 76) 77 78pw_py_test( 79 name = "file_filter_test", 80 size = "small", 81 srcs = [ 82 "file_filter_test.py", 83 ], 84 deps = [ 85 ":pw_cli", 86 ], 87) 88 89pw_py_test( 90 name = "git_repo_test", 91 size = "small", 92 srcs = [ 93 "git_repo_test.py", 94 ], 95 deps = [ 96 ":pw_cli", 97 ], 98) 99 100pw_py_test( 101 name = "plugins_test", 102 size = "small", 103 srcs = [ 104 "plugins_test.py", 105 ], 106 deps = [ 107 ":pw_cli", 108 ], 109) 110 111pw_py_test( 112 name = "plural_test", 113 size = "small", 114 srcs = [ 115 "plural_test.py", 116 ], 117 deps = [ 118 ":pw_cli", 119 ], 120) 121 122pw_py_test( 123 name = "tool_runner_test", 124 size = "small", 125 srcs = [ 126 "tool_runner_test.py", 127 ], 128 deps = [ 129 ":pw_cli", 130 ], 131) 132