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_test") 17 18package(default_visibility = ["//visibility:public"]) 19 20py_library( 21 name = "pw_cli_analytics", 22 srcs = [ 23 "pw_cli_analytics/__init__.py", 24 "pw_cli_analytics/__main__.py", 25 "pw_cli_analytics/analytics.py", 26 "pw_cli_analytics/cli.py", 27 "pw_cli_analytics/config.py", 28 ], 29 imports = ["."], 30 deps = [ 31 "//pw_config_loader/py:pw_config_loader", 32 "//pw_env_setup/py:pw_env_setup", 33 "@python_packages//requests", 34 ], 35) 36 37pw_py_test( 38 name = "analytics_test", 39 size = "small", 40 srcs = [ 41 "analytics_test.py", 42 ], 43 env = { 44 "PW_PROJECT_ROOT": "/home/test/project", 45 "PW_ROOT": "/home/test/project/pigweed", 46 }, 47 deps = [ 48 ":pw_cli_analytics", 49 ], 50) 51