.
diff --git a/python/BUILD.bazel b/python/BUILD.bazel index e83b79c..a50ee41 100644 --- a/python/BUILD.bazel +++ b/python/BUILD.bazel
@@ -103,6 +103,7 @@ "//python/private/pypi:package_annotation_bzl", "//python/private/pypi:pip_compile_bzl", "//python/private/pypi:pip_repository_bzl", + "//python/private/pypi:py_console_script_binary_bzl", "//python/private/pypi:whl_library_alias_bzl", "//python/private/whl_filegroup:whl_filegroup_bzl", ],
diff --git a/python/entry_points/BUILD.bazel b/python/entry_points/BUILD.bazel index 46dbd92..afbed57 100644 --- a/python/entry_points/BUILD.bazel +++ b/python/entry_points/BUILD.bazel
@@ -12,26 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") - -exports_files( - [ - "py_console_script_binary.bzl", - ], - visibility = ["//docs:__subpackages__"], -) - -bzl_library( +# Temporary compatibility alias +alias( name = "py_console_script_binary_bzl", - srcs = [":py_console_script_binary.bzl"], - visibility = ["//visibility:public"], - deps = [ - "//python/private:py_console_script_binary_bzl", - ], -) - -filegroup( - name = "distribution", - srcs = glob(["**"]), - visibility = ["//python:__subpackages__"], + actual = "//python:pip_bzl", + deprecation = "Use //python:pip_bzl instead; this alias will be removed in a future release.", )
diff --git a/python/entry_points/py_console_script_binary.bzl b/python/entry_points/py_console_script_binary.bzl deleted file mode 100644 index c61d44a..0000000 --- a/python/entry_points/py_console_script_binary.bzl +++ /dev/null
@@ -1,24 +0,0 @@ -# Copyright 2023 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Creates an executable (a non-test binary) for console_script entry points. - -```{include} /_includes/py_console_script_binary.md -``` -""" - -load("//python/private:py_console_script_binary.bzl", _py_console_script_binary = "py_console_script_binary") - -py_console_script_binary = _py_console_script_binary
diff --git a/python/pip.bzl b/python/pip.bzl index a1a6720..9a1cca0 100644 --- a/python/pip.bzl +++ b/python/pip.bzl
@@ -24,6 +24,7 @@ load("//python/private/pypi:package_annotation.bzl", _package_annotation = "package_annotation") load("//python/private/pypi:pip_compile.bzl", "pip_compile") load("//python/private/pypi:pip_repository.bzl", "pip_repository") +load("//python/private/pypi:py_console_script_binary.bzl", _py_console_script_binary = "py_console_script_binary") load("//python/private/pypi:whl_library_alias.bzl", _whl_library_alias = "whl_library_alias") load("//python/private/whl_filegroup:whl_filegroup.bzl", _whl_filegroup = "whl_filegroup") @@ -32,6 +33,8 @@ pip_parse = pip_repository whl_filegroup = _whl_filegroup +py_console_script_binary = _py_console_script_binary + # Extra utilities visible to rules_python users. pip_utils = struct( normalize_name = normalize_name,
diff --git a/python/private/pypi/BUILD.bazel b/python/private/pypi/BUILD.bazel index 08fb725..6c61516 100644 --- a/python/private/pypi/BUILD.bazel +++ b/python/private/pypi/BUILD.bazel
@@ -4,7 +4,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -228,6 +228,17 @@ ) bzl_library( + name = "py_console_script_binary_bzl", + srcs = [ + ":py_console_script_binary.bzl", + ":py_console_script_gen.bzl", + ], + deps = [ + "//python:defs_bzl", + ], +) + +bzl_library( name = "render_pkg_aliases_bzl", srcs = ["render_pkg_aliases.bzl"], deps = [
diff --git a/python/private/py_console_script_binary.bzl b/python/private/pypi/py_console_script_binary.bzl similarity index 100% rename from python/private/py_console_script_binary.bzl rename to python/private/pypi/py_console_script_binary.bzl
diff --git a/python/private/py_console_script_gen.bzl b/python/private/pypi/py_console_script_gen.bzl similarity index 100% rename from python/private/py_console_script_gen.bzl rename to python/private/pypi/py_console_script_gen.bzl
diff --git a/python/private/py_console_script_gen.py b/python/private/pypi/py_console_script_gen.py similarity index 100% rename from python/private/py_console_script_gen.py rename to python/private/pypi/py_console_script_gen.py