|
| 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 | + |
| 17 | +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") |
| 18 | +load("//python/uv/private:current_toolchain.bzl", "current_toolchain") |
| 19 | + |
| 20 | +package(default_visibility = ["//:__subpackages__"]) |
| 21 | + |
| 22 | +filegroup( |
| 23 | + name = "distribution", |
| 24 | + srcs = glob(["**"]) + [ |
| 25 | + "//python/uv/private:distribution", |
| 26 | + ], |
| 27 | + visibility = ["//:__subpackages__"], |
| 28 | +) |
| 29 | + |
| 30 | +# For stardoc to reference the files |
| 31 | +exports_files(["defs.bzl"]) |
| 32 | + |
| 33 | +toolchain_type( |
| 34 | + name = "uv_toolchain_type", |
| 35 | + visibility = ["//visibility:public"], |
| 36 | +) |
| 37 | + |
| 38 | +current_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 = ["@rules_python//examples:__subpackages__"], |
| 45 | +) |
| 46 | + |
| 47 | +bzl_library( |
| 48 | + name = "defs", |
| 49 | + srcs = ["defs.bzl"], |
| 50 | + # EXPERIMENTAL: Visibility is restricted to allow for changes. |
| 51 | + visibility = ["//:__subpackages__"], |
| 52 | +) |
| 53 | + |
| 54 | +bzl_library( |
| 55 | + name = "extensions", |
| 56 | + srcs = ["extensions.bzl"], |
| 57 | + # EXPERIMENTAL: Visibility is restricted to allow for changes. |
| 58 | + visibility = ["//:__subpackages__"], |
| 59 | + deps = [":repositories"], |
| 60 | +) |
| 61 | + |
| 62 | +bzl_library( |
| 63 | + name = "repositories", |
| 64 | + srcs = ["repositories.bzl"], |
| 65 | + # EXPERIMENTAL: Visibility is restricted to allow for changes. |
| 66 | + visibility = ["//:__subpackages__"], |
| 67 | + deps = [ |
| 68 | + "//python/uv/private:toolchains_repo", |
| 69 | + "//python/uv/private:versions", |
| 70 | + ], |
| 71 | +) |
| 72 | + |
| 73 | +bzl_library( |
| 74 | + name = "toolchain", |
| 75 | + srcs = ["toolchain.bzl"], |
| 76 | + # EXPERIMENTAL: Visibility is restricted to allow for changes. |
| 77 | + visibility = ["//:__subpackages__"], |
| 78 | +) |
0 commit comments