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} 39 40pw_python_package("pw_snapshot") { 41 generate_setup = { 42 metadata = { 43 name = "pw_snapshot" 44 version = "0.0.1" 45 } 46 } 47 sources = [ 48 "generate_example_snapshot.py", 49 "pw_snapshot/__init__.py", 50 "pw_snapshot/processor.py", 51 ] 52 tests = [ 53 "metadata_test.py", 54 "processor_test.py", 55 ] 56 python_deps = [ 57 ":pw_snapshot_metadata", 58 "$dir_pw_build_info/py", 59 "$dir_pw_chrono:protos.python", 60 "$dir_pw_chrono/py", 61 "$dir_pw_cpu_exception_cortex_m/py", 62 "$dir_pw_cpu_exception_risc_v/py", 63 "$dir_pw_symbolizer/py", 64 "$dir_pw_thread:protos.python", 65 "$dir_pw_thread/py", 66 "$dir_pw_tokenizer/py", 67 "..:snapshot_proto.python", 68 ] 69 pylintrc = "$dir_pigweed/.pylintrc" 70 mypy_ini = "$dir_pigweed/.mypy.ini" 71} 72 73pw_python_group("py") { 74 python_deps = [ 75 ":pw_snapshot", 76 ":pw_snapshot_metadata", 77 ] 78} 79