1# Copyright 2022 The Bazel Authors. All rights reserved. 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 15"""License declaration and compliance checking tools.""" 16 17load("@rules_python//python:defs.bzl", "py_binary", "py_library") 18 19package( 20 default_applicable_licenses = ["//:license", "//:package_info"], 21 default_visibility = ["//visibility:public"], 22) 23 24licenses(["notice"]) 25 26filegroup( 27 name = "standard_package", 28 srcs = glob(["**"]), 29 visibility = ["//distro:__pkg__"], 30) 31 32exports_files(["diff_test.sh"]) 33 34py_binary( 35 name = "checker_demo", 36 srcs = ["checker_demo.py"], 37 python_version = "PY3", 38 visibility = ["//visibility:public"], 39) 40 41py_library( 42 name = "sbom_lib", 43 srcs = ["sbom.py"], 44 visibility = ["//visibility:public"], 45) 46 47py_binary( 48 name = "write_sbom", 49 srcs = ["write_sbom.py"], 50 deps = [":sbom_lib"], 51 python_version = "PY3", 52 visibility = ["//visibility:public"], 53) 54 55py_binary( 56 name = "write_workspace_sbom", 57 srcs = ["write_workspace_sbom.py"], 58 deps = [":sbom_lib"], 59 python_version = "PY3", 60 visibility = ["//visibility:public"], 61) 62