1*61c4878aSAndroid Build Coastguard Worker# Copyright 2020 The Pigweed Authors 2*61c4878aSAndroid Build Coastguard Worker# 3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of 5*61c4878aSAndroid Build Coastguard Worker# the License at 6*61c4878aSAndroid Build Coastguard Worker# 7*61c4878aSAndroid Build Coastguard Worker# https://www.apache.org/licenses/LICENSE-2.0 8*61c4878aSAndroid Build Coastguard Worker# 9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under 13*61c4878aSAndroid Build Coastguard Worker# the License. 14*61c4878aSAndroid Build Coastguard Worker 15*61c4878aSAndroid Build Coastguard Workerimport("//build_overrides/pigweed.gni") 16*61c4878aSAndroid Build Coastguard Worker 17*61c4878aSAndroid Build Coastguard Workerimport("$dir_pw_build/python.gni") 18*61c4878aSAndroid Build Coastguard Worker 19*61c4878aSAndroid Build Coastguard Workerpw_python_package("py") { 20*61c4878aSAndroid Build Coastguard Worker setup = [ 21*61c4878aSAndroid Build Coastguard Worker "pyproject.toml", 22*61c4878aSAndroid Build Coastguard Worker "setup.cfg", 23*61c4878aSAndroid Build Coastguard Worker ] 24*61c4878aSAndroid Build Coastguard Worker sources = [ 25*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/__init__.py", 26*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/bazel_checks.py", 27*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/bazel_parser.py", 28*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/build.py", 29*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/cli.py", 30*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/cpp_checks.py", 31*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/__init__.py", 32*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/bazel.py", 33*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/core.py", 34*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/cpp.py", 35*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/gn.py", 36*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/python.py", 37*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/__init__.py", 38*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format_code.py", 39*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/git_repo.py", 40*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/gitmodules.py", 41*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/inclusive_language.py", 42*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/install_hook.py", 43*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/javascript_checks.py", 44*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/json_check.py", 45*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/keep_sorted.py", 46*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/module_owners.py", 47*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/ninja_parser.py", 48*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/npm_presubmit.py", 49*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/owners_checks.py", 50*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/pigweed_presubmit.py", 51*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/presubmit.py", 52*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/presubmit_context.py", 53*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/python_checks.py", 54*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/repo.py", 55*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/rst_format.py", 56*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/shell_checks.py", 57*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/source_in_build.py", 58*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/todo_check.py", 59*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/tools.py", 60*61c4878aSAndroid Build Coastguard Worker ] 61*61c4878aSAndroid Build Coastguard Worker inputs = [ 62*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/bazel_test_data.bazel", 63*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/bazel_test_data_golden.bazel", 64*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/clang_format_config", 65*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/cpp_test_data.cc", 66*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/cpp_test_data_golden.cc", 67*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/gn_test_data.gn", 68*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/gn_test_data_golden.gn", 69*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/malformed_file.txt", 70*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/python_test_data.py", 71*61c4878aSAndroid Build Coastguard Worker "pw_presubmit/format/test_data/python_test_data_golden.py", 72*61c4878aSAndroid Build Coastguard Worker ] 73*61c4878aSAndroid Build Coastguard Worker tests = [ 74*61c4878aSAndroid Build Coastguard Worker "bazel_checks_test.py", 75*61c4878aSAndroid Build Coastguard Worker "bazel_parser_test.py", 76*61c4878aSAndroid Build Coastguard Worker "bazel_format_test.py", 77*61c4878aSAndroid Build Coastguard Worker "context_test.py", 78*61c4878aSAndroid Build Coastguard Worker "cpp_checks_test.py", 79*61c4878aSAndroid Build Coastguard Worker "cpp_format_test.py", 80*61c4878aSAndroid Build Coastguard Worker "format_testing_utils.py", 81*61c4878aSAndroid Build Coastguard Worker "format_core_test.py", 82*61c4878aSAndroid Build Coastguard Worker "gitmodules_test.py", 83*61c4878aSAndroid Build Coastguard Worker "gn_format_test.py", 84*61c4878aSAndroid Build Coastguard Worker "inclusive_language_test.py", 85*61c4878aSAndroid Build Coastguard Worker "keep_sorted_test.py", 86*61c4878aSAndroid Build Coastguard Worker "ninja_parser_test.py", 87*61c4878aSAndroid Build Coastguard Worker "presubmit_test.py", 88*61c4878aSAndroid Build Coastguard Worker "python_format_test.py", 89*61c4878aSAndroid Build Coastguard Worker "owners_checks_test.py", 90*61c4878aSAndroid Build Coastguard Worker "todo_check_test.py", 91*61c4878aSAndroid Build Coastguard Worker "tools_test.py", 92*61c4878aSAndroid Build Coastguard Worker ] 93*61c4878aSAndroid Build Coastguard Worker 94*61c4878aSAndroid Build Coastguard Worker python_deps = [ 95*61c4878aSAndroid Build Coastguard Worker "$dir_pw_cli/py", 96*61c4878aSAndroid Build Coastguard Worker "$dir_pw_env_setup/py", 97*61c4878aSAndroid Build Coastguard Worker "$dir_pw_package/py", 98*61c4878aSAndroid Build Coastguard Worker ] 99*61c4878aSAndroid Build Coastguard Worker pylintrc = "$dir_pigweed/.pylintrc" 100*61c4878aSAndroid Build Coastguard Worker mypy_ini = "$dir_pigweed/.mypy.ini" 101*61c4878aSAndroid Build Coastguard Worker ruff_toml = "$dir_pigweed/.ruff.toml" 102*61c4878aSAndroid Build Coastguard Worker} 103