File tree Expand file tree Collapse file tree 6 files changed +44
-0
lines changed Expand file tree Collapse file tree 6 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ bzl_library(
111
111
name = "py_binary_bzl" ,
112
112
srcs = ["py_binary.bzl" ],
113
113
deps = [
114
+ "//python/private:register_extension_info_bzl" ,
114
115
"//python/private:util_bzl" ,
115
116
"//python/private/common:py_binary_macro_bazel_bzl" ,
116
117
"@rules_python_internal//:rules_python_config_bzl" ,
@@ -142,6 +143,7 @@ bzl_library(
142
143
name = "py_library_bzl" ,
143
144
srcs = ["py_library.bzl" ],
144
145
deps = [
146
+ "//python/private:register_extension_info_bzl" ,
145
147
"//python/private:util_bzl" ,
146
148
"//python/private/common:py_library_macro_bazel_bzl" ,
147
149
"@rules_python_internal//:rules_python_config_bzl" ,
@@ -182,6 +184,7 @@ bzl_library(
182
184
name = "py_test_bzl" ,
183
185
srcs = ["py_test.bzl" ],
184
186
deps = [
187
+ "//python/private:register_extension_info_bzl" ,
185
188
"//python/private:util_bzl" ,
186
189
"//python/private/common:py_test_macro_bazel_bzl" ,
187
190
"@rules_python_internal//:rules_python_config_bzl" ,
Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ bzl_library(
163
163
deps = [":bazel_tools_bzl" ],
164
164
)
165
165
166
+ bzl_library (
167
+ name = "register_extension_info_bzl" ,
168
+ srcs = ["register_extension_info.bzl" ],
169
+ )
170
+
166
171
bzl_library (
167
172
name = "render_pkg_aliases_bzl" ,
168
173
srcs = ["render_pkg_aliases.bzl" ],
Original file line number Diff line number Diff line change
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
+ """Stub implementation to make patching easier."""
15
+
16
+ # buildifier: disable=unused-variable
17
+ def register_extension_info (** kwargs ):
18
+ """A no-op stub to make Google patching easier."""
Original file line number Diff line number Diff line change 15
15
"""Public entry point for py_binary."""
16
16
17
17
load ("@rules_python_internal//:rules_python_config.bzl" , "config" )
18
+ load ("//python/private:register_extension_info.bzl" , "register_extension_info" )
18
19
load ("//python/private:util.bzl" , "add_migration_tag" )
19
20
load ("//python/private/common:py_binary_macro_bazel.bzl" , _starlark_py_binary = "py_binary" )
20
21
@@ -33,3 +34,8 @@ def py_binary(**attrs):
33
34
fail ("Python 2 is no longer supported: https://github.com/bazelbuild/rules_python/issues/886" )
34
35
35
36
_py_binary_impl (** add_migration_tag (attrs ))
37
+
38
+ register_extension_info (
39
+ extension = py_binary ,
40
+ label_regex_for_dep = "{extension_name}" ,
41
+ )
Original file line number Diff line number Diff line change 15
15
"""Public entry point for py_library."""
16
16
17
17
load ("@rules_python_internal//:rules_python_config.bzl" , "config" )
18
+ load ("//python/private:register_extension_info.bzl" , "register_extension_info" )
18
19
load ("//python/private:util.bzl" , "add_migration_tag" )
19
20
load ("//python/private/common:py_library_macro_bazel.bzl" , _starlark_py_library = "py_library" )
20
21
@@ -31,3 +32,8 @@ def py_library(**attrs):
31
32
fail ("Python 2 is no longer supported: https://github.com/bazelbuild/rules_python/issues/886" )
32
33
33
34
_py_library_impl (** add_migration_tag (attrs ))
35
+
36
+ register_extension_info (
37
+ extension = py_library ,
38
+ label_regex_for_dep = "{extension_name}" ,
39
+ )
Original file line number Diff line number Diff line change 15
15
"""Public entry point for py_test."""
16
16
17
17
load ("@rules_python_internal//:rules_python_config.bzl" , "config" )
18
+ load ("//python/private:register_extension_info.bzl" , "register_extension_info" )
18
19
load ("//python/private:util.bzl" , "add_migration_tag" )
19
20
load ("//python/private/common:py_test_macro_bazel.bzl" , _starlark_py_test = "py_test" )
20
21
@@ -34,3 +35,8 @@ def py_test(**attrs):
34
35
35
36
# buildifier: disable=native-python
36
37
_py_test_impl (** add_migration_tag (attrs ))
38
+
39
+ register_extension_info (
40
+ extension = py_test ,
41
+ label_regex_for_dep = "{extension_name}" ,
42
+ )
You can’t perform that action at this time.
0 commit comments