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: "compliance_metadata",
38    srcs: [
39        "compliance_metadata.py",
40    ],
41}
42
43python_binary_host {
44    name: "gen_sbom",
45    srcs: [
46        "gen_sbom.py",
47    ],
48    version: {
49        py3: {
50            embedded_launcher: true,
51        },
52    },
53    libs: [
54        "compliance_metadata",
55        "metadata_file_proto_py",
56        "libprotobuf-python",
57        "sbom_lib",
58    ],
59}
60
61python_library_host {
62    name: "sbom_lib",
63    srcs: [
64        "sbom_data.py",
65        "sbom_writers.py",
66    ],
67}
68
69python_test_host {
70    name: "sbom_writers_test",
71    main: "sbom_writers_test.py",
72    srcs: [
73        "sbom_writers_test.py",
74    ],
75    data: [
76        "testdata/*",
77    ],
78    libs: [
79        "sbom_lib",
80    ],
81    version: {
82        py3: {
83            embedded_launcher: true,
84        },
85    },
86    test_suites: ["general-tests"],
87}
88
89python_test_host {
90    name: "sbom_data_test",
91    main: "sbom_data_test.py",
92    srcs: [
93        "sbom_data_test.py",
94    ],
95    libs: [
96        "sbom_lib",
97    ],
98    version: {
99        py3: {
100            embedded_launcher: true,
101        },
102    },
103    test_suites: ["general-tests"],
104}
105
106python_binary_host {
107    name: "generate-sbom-framework_res",
108    srcs: [
109        "generate-sbom-framework_res.py",
110    ],
111    version: {
112        py3: {
113            embedded_launcher: true,
114        },
115    },
116    libs: [
117        "sbom_lib",
118    ],
119}
120
121python_binary_host {
122    name: "gen_notice_xml",
123    srcs: [
124        "gen_notice_xml.py",
125    ],
126    version: {
127        py3: {
128            embedded_launcher: true,
129        },
130    },
131    libs: [
132    ],
133}
134