xref: /aosp_15_r20/external/pigweed/pw_software_update/py/BUILD.gn (revision 61c4878ac05f98d0ceed94b57d316916de578985)
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("py") {
20  generate_setup = {
21    metadata = {
22      name = "pw_software_update"
23      version = "0.0.1"
24    }
25    options = {
26      install_requires = [
27        "cryptography",
28        "google-cloud-storage",
29      ]
30      tests_require = [
31        "cryptography",
32        "google-cloud-storage",
33      ]
34    }
35  }
36
37  sources = [
38    "pw_software_update/__init__.py",
39    "pw_software_update/cli.py",
40    "pw_software_update/dev_sign.py",
41    "pw_software_update/generate_test_bundle.py",
42    "pw_software_update/keys.py",
43    "pw_software_update/metadata.py",
44    "pw_software_update/remote_sign.py",
45    "pw_software_update/root_metadata.py",
46    "pw_software_update/update_bundle.py",
47    "pw_software_update/verify.py",
48  ]
49
50  tests = [
51    "cli_test.py",
52    "dev_sign_test.py",
53    "keys_test.py",
54    "metadata_test.py",
55    "remote_sign_test.py",
56    "root_metadata_test.py",
57    "update_bundle_test.py",
58    "verify_test.py",
59  ]
60
61  pylintrc = "$dir_pigweed/.pylintrc"
62  mypy_ini = "$dir_pigweed/.mypy.ini"
63  ruff_toml = "$dir_pigweed/.ruff.toml"
64
65  proto_library = "..:protos"
66}
67