1// Copyright (C) 2023 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://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, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19python_binary_host { 20 name: "generate-sbom", 21 srcs: [ 22 "generate-sbom.py", 23 ], 24 version: { 25 py3: { 26 embedded_launcher: true, 27 }, 28 }, 29 libs: [ 30 "metadata_file_proto_py", 31 "libprotobuf-python", 32 "sbom_lib", 33 ], 34} 35 36python_library_host { 37 name: "sbom_lib", 38 srcs: [ 39 "sbom_data.py", 40 "sbom_writers.py", 41 ], 42} 43 44python_test_host { 45 name: "sbom_writers_test", 46 main: "sbom_writers_test.py", 47 srcs: [ 48 "sbom_writers_test.py", 49 ], 50 data: [ 51 "testdata/*", 52 ], 53 libs: [ 54 "sbom_lib", 55 ], 56 version: { 57 py3: { 58 embedded_launcher: true, 59 }, 60 }, 61 test_suites: ["general-tests"], 62} 63 64python_test_host { 65 name: "sbom_data_test", 66 main: "sbom_data_test.py", 67 srcs: [ 68 "sbom_data_test.py", 69 ], 70 libs: [ 71 "sbom_lib", 72 ], 73 version: { 74 py3: { 75 embedded_launcher: true, 76 }, 77 }, 78 test_suites: ["general-tests"], 79} 80 81python_binary_host { 82 name: "generate-sbom-framework_res", 83 srcs: [ 84 "generate-sbom-framework_res.py", 85 ], 86 version: { 87 py3: { 88 embedded_launcher: true, 89 }, 90 }, 91 libs: [ 92 "sbom_lib", 93 ], 94}