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 15import("//build_overrides/pigweed.gni") 16 17import("$dir_pw_build/python.gni") 18 19pw_python_package("pw_snapshot_metadata") { 20 generate_setup = { 21 metadata = { 22 name = "pw_snapshot_metadata" 23 version = "0.0.1" 24 } 25 } 26 27 sources = [ 28 "pw_snapshot_metadata/__init__.py", 29 "pw_snapshot_metadata/metadata.py", 30 ] 31 python_deps = [ 32 "$dir_pw_log_tokenized/py", 33 "$dir_pw_tokenizer/py", 34 "..:metadata_proto.python", 35 ] 36 pylintrc = "$dir_pigweed/.pylintrc" 37 mypy_ini = "$dir_pigweed/.mypy.ini" 38 ruff_toml = "$dir_pigweed/.ruff.toml" 39} 40 41pw_python_package("pw_snapshot") { 42 generate_setup = { 43 metadata = { 44 name = "pw_snapshot" 45 version = "0.0.1" 46 } 47 } 48 sources = [ 49 "generate_example_snapshot.py", 50 "pw_snapshot/__init__.py", 51 "pw_snapshot/processor.py", 52 ] 53 tests = [ 54 "metadata_test.py", 55 "processor_test.py", 56 ] 57 python_deps = [ 58 ":pw_snapshot_metadata", 59 "$dir_pw_build_info/py", 60 "$dir_pw_chrono:protos.python", 61 "$dir_pw_chrono/py", 62 "$dir_pw_cpu_exception_cortex_m/py", 63 "$dir_pw_cpu_exception_risc_v/py", 64 "$dir_pw_symbolizer/py", 65 "$dir_pw_thread:protos.python", 66 "$dir_pw_thread/py", 67 "$dir_pw_tokenizer/py", 68 "..:snapshot_proto.python", 69 ] 70 pylintrc = "$dir_pigweed/.pylintrc" 71 mypy_ini = "$dir_pigweed/.mypy.ini" 72 ruff_toml = "$dir_pigweed/.ruff.toml" 73} 74 75pw_python_group("py") { 76 python_deps = [ 77 ":pw_snapshot", 78 ":pw_snapshot_metadata", 79 ] 80} 81