1# Copyright 2022 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") 17 18package(default_visibility = ["//visibility:public"]) 19 20py_library( 21 name = "pw_system_lib", 22 srcs = [ 23 "pw_system/__init__.py", 24 "pw_system/console.py", 25 "pw_system/device.py", 26 "pw_system/device_connection.py", 27 "pw_system/device_sim.py", 28 "pw_system/device_tracing.py", 29 "pw_system/find_serial_port.py", 30 "pw_system/snapshot.py", 31 "pw_system/trace_client.py", 32 ], 33 imports = ["."], 34 deps = [ 35 "//pw_cli/py:pw_cli", 36 "//pw_console/py:pw_console", 37 "//pw_file:file_proto_py_pb2", 38 "//pw_hdlc/py:pw_hdlc", 39 "//pw_log:log_proto_py_pb2", 40 "//pw_log/py:pw_log", 41 "//pw_log_rpc/py:pw_log_rpc", 42 "//pw_metric:metric_proto_py_pb2", 43 "//pw_metric/py:pw_metric", 44 "//pw_rpc:echo_py_pb2", 45 "//pw_rpc/py:pw_rpc", 46 "//pw_snapshot/py:pw_snapshot", 47 "//pw_stream/py:pw_stream", 48 "//pw_system:device_service_py_pb2", 49 "//pw_thread:thread_proto_py_pb2", 50 "//pw_thread:thread_snapshot_service_py_pb2", 51 "//pw_thread/py:pw_thread", 52 "//pw_tokenizer:tokenizer_proto_py_pb2", 53 "//pw_tokenizer/py:pw_tokenizer", 54 "//pw_trace/py:pw_trace", 55 "//pw_trace_tokenized:proto_py", 56 "//pw_trace_tokenized/py:pw_trace_tokenized", 57 "//pw_transfer/py:pw_transfer", 58 "//pw_unit_test:unit_test_py_pb2", 59 "//pw_unit_test/py:pw_unit_test", 60 "@python_packages//debugpy", 61 "@python_packages//ipython", 62 "@python_packages//pyserial", 63 ], 64) 65 66pw_py_binary( 67 name = "pw_system_console", 68 srcs = [ 69 "pw_system/console.py", 70 ], 71 main = "pw_system/console.py", 72 deps = [ 73 ":pw_system_lib", 74 ], 75) 76 77pw_py_binary( 78 name = "device_sim", 79 srcs = [ 80 "pw_system/device_sim.py", 81 ], 82 deps = [ 83 ":pw_system_lib", 84 ], 85) 86