xref: /aosp_15_r20/external/bazelbuild-rules_python/python/private/common/BUILD.bazel (revision 60517a1edbc8ecf509223e9af94a7adec7d736b8)
1# Copyright 2023 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
15load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16
17package(
18    default_visibility = ["//:__subpackages__"],
19)
20
21bzl_library(
22    name = "attributes_bazel_bzl",
23    srcs = ["attributes_bazel.bzl"],
24    deps = ["//python/private:rules_cc_srcs_bzl"],
25)
26
27bzl_library(
28    name = "attributes_bzl",
29    srcs = ["attributes.bzl"],
30    deps = [
31        ":common_bzl",
32        ":providers_bzl",
33        ":py_internal_bzl",
34        ":semantics_bzl",
35        "//python/private:enum_bzl",
36        "//python/private:flags_bzl",
37        "//python/private:reexports_bzl",
38        "//python/private:rules_cc_srcs_bzl",
39        "@bazel_skylib//rules:common_settings",
40    ],
41)
42
43bzl_library(
44    name = "cc_helper_bzl",
45    srcs = ["cc_helper.bzl"],
46    deps = [":py_internal_bzl"],
47)
48
49bzl_library(
50    name = "common_bazel_bzl",
51    srcs = ["common_bazel.bzl"],
52    deps = [
53        ":attributes_bzl",
54        ":common_bzl",
55        ":providers_bzl",
56        ":py_internal_bzl",
57        "//python/private:py_interpreter_program_bzl",
58        "//python/private:toolchain_types_bzl",
59        "@bazel_skylib//lib:paths",
60    ],
61)
62
63bzl_library(
64    name = "common_bzl",
65    srcs = ["common.bzl"],
66    deps = [
67        ":cc_helper_bzl",
68        ":providers_bzl",
69        ":py_internal_bzl",
70        ":semantics_bzl",
71        "//python/private:reexports_bzl",
72        "//python/private:rules_cc_srcs_bzl",
73    ],
74)
75
76filegroup(
77    name = "distribution",
78    srcs = glob(["**"]),
79)
80
81bzl_library(
82    name = "providers_bzl",
83    srcs = ["providers.bzl"],
84    deps = [
85        ":semantics_bzl",
86        "//python/private:rules_cc_srcs_bzl",
87        "//python/private:util_bzl",
88    ],
89)
90
91bzl_library(
92    name = "py_binary_macro_bazel_bzl",
93    srcs = ["py_binary_macro_bazel.bzl"],
94    deps = [
95        ":common_bzl",
96        ":py_binary_rule_bazel_bzl",
97    ],
98)
99
100bzl_library(
101    name = "py_binary_rule_bazel_bzl",
102    srcs = ["py_binary_rule_bazel.bzl"],
103    deps = [
104        ":attributes_bzl",
105        ":py_executable_bazel_bzl",
106        ":semantics_bzl",
107        "@bazel_skylib//lib:dicts",
108    ],
109)
110
111bzl_library(
112    name = "py_executable_bazel_bzl",
113    srcs = ["py_executable_bazel.bzl"],
114    deps = [
115        ":attributes_bazel_bzl",
116        ":common_bazel_bzl",
117        ":common_bzl",
118        ":providers_bzl",
119        ":py_executable_bzl",
120        ":py_internal_bzl",
121        ":semantics_bzl",
122    ],
123)
124
125bzl_library(
126    name = "py_executable_bzl",
127    srcs = ["py_executable.bzl"],
128    deps = [
129        ":attributes_bzl",
130        ":cc_helper_bzl",
131        ":common_bzl",
132        ":providers_bzl",
133        ":py_internal_bzl",
134        "//python/private:flags_bzl",
135        "//python/private:py_executable_info_bzl",
136        "//python/private:rules_cc_srcs_bzl",
137        "//python/private:toolchain_types_bzl",
138        "@bazel_skylib//lib:dicts",
139        "@bazel_skylib//lib:structs",
140        "@bazel_skylib//rules:common_settings",
141    ],
142)
143
144bzl_library(
145    name = "py_internal_bzl",
146    srcs = ["py_internal.bzl"],
147    deps = ["@rules_python_internal//:py_internal_bzl"],
148)
149
150bzl_library(
151    name = "py_library_bzl",
152    srcs = ["py_library.bzl"],
153    deps = [
154        ":attributes_bzl",
155        ":common_bzl",
156        ":providers_bzl",
157        ":py_internal_bzl",
158        "//python/private:flags_bzl",
159        "//python/private:toolchain_types_bzl",
160        "@bazel_skylib//lib:dicts",
161        "@bazel_skylib//rules:common_settings",
162    ],
163)
164
165bzl_library(
166    name = "py_library_macro_bazel_bzl",
167    srcs = ["py_library_macro_bazel.bzl"],
168    deps = [":py_library_rule_bazel_bzl"],
169)
170
171bzl_library(
172    name = "py_library_rule_bazel_bzl",
173    srcs = ["py_library_rule_bazel.bzl"],
174    deps = [
175        ":attributes_bazel_bzl",
176        ":common_bazel_bzl",
177        ":common_bzl",
178        ":py_library_bzl",
179    ],
180)
181
182bzl_library(
183    name = "py_runtime_macro_bzl",
184    srcs = ["py_runtime_macro.bzl"],
185    deps = [":py_runtime_rule_bzl"],
186)
187
188bzl_library(
189    name = "py_runtime_rule_bzl",
190    srcs = ["py_runtime_rule.bzl"],
191    deps = [
192        ":attributes_bzl",
193        ":providers_bzl",
194        ":py_internal_bzl",
195        "//python/private:reexports_bzl",
196        "//python/private:util_bzl",
197        "@bazel_skylib//lib:dicts",
198        "@bazel_skylib//lib:paths",
199    ],
200)
201
202bzl_library(
203    name = "py_test_macro_bazel_bzl",
204    srcs = ["py_test_macro_bazel.bzl"],
205    deps = [
206        ":common_bazel_bzl",
207        ":py_test_rule_bazel_bzl",
208    ],
209)
210
211bzl_library(
212    name = "py_test_rule_bazel_bzl",
213    srcs = ["py_test_rule_bazel.bzl"],
214    deps = [
215        ":attributes_bzl",
216        ":common_bzl",
217        ":py_executable_bazel_bzl",
218        ":semantics_bzl",
219        "@bazel_skylib//lib:dicts",
220    ],
221)
222
223bzl_library(
224    name = "semantics_bzl",
225    srcs = ["semantics.bzl"],
226)
227