1# Copyright 2024 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# EXPERIMENTAL: This is experimental and may be removed without notice 16 17load("@bazel_skylib//:bzl_library.bzl", "bzl_library") 18load("//python/uv/private:current_toolchain.bzl", "current_toolchain") 19 20package(default_visibility = ["//:__subpackages__"]) 21 22filegroup( 23 name = "distribution", 24 srcs = glob(["**"]) + [ 25 "//python/uv/private:distribution", 26 ], 27 visibility = ["//:__subpackages__"], 28) 29 30# For stardoc to reference the files 31exports_files(["defs.bzl"]) 32 33toolchain_type( 34 name = "uv_toolchain_type", 35 visibility = ["//visibility:public"], 36) 37 38current_toolchain( 39 name = "current_toolchain", 40 # Marked manual so that `bazel test //...` passes 41 # even if no toolchain is registered. 42 tags = ["manual"], 43 # EXPERIMENTAL: Visibility is restricted to allow for changes. 44 visibility = [ 45 "//:__subpackages__", 46 "@rules_python//examples:__subpackages__", 47 ], 48) 49 50bzl_library( 51 name = "defs", 52 srcs = ["defs.bzl"], 53 # EXPERIMENTAL: Visibility is restricted to allow for changes. 54 visibility = ["//:__subpackages__"], 55) 56 57bzl_library( 58 name = "extensions", 59 srcs = ["extensions.bzl"], 60 # EXPERIMENTAL: Visibility is restricted to allow for changes. 61 visibility = ["//:__subpackages__"], 62 deps = [":repositories"], 63) 64 65bzl_library( 66 name = "repositories", 67 srcs = ["repositories.bzl"], 68 # EXPERIMENTAL: Visibility is restricted to allow for changes. 69 visibility = ["//:__subpackages__"], 70 deps = [ 71 "//python/uv/private:toolchains_repo", 72 "//python/uv/private:versions", 73 ], 74) 75 76bzl_library( 77 name = "toolchain", 78 srcs = ["toolchain.bzl"], 79 # EXPERIMENTAL: Visibility is restricted to allow for changes. 80 visibility = ["//:__subpackages__"], 81) 82