.
diff --git a/python/private/BUILD.bazel b/python/private/BUILD.bazel
index c5da4e3..0121031 100644
--- a/python/private/BUILD.bazel
+++ b/python/private/BUILD.bazel
@@ -14,8 +14,6 @@
 
 load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
 load("@bazel_skylib//rules:common_settings.bzl", "bool_setting")
-load("//python:py_binary.bzl", "py_binary")
-load("//python:py_library.bzl", "py_library")
 load("//python:versions.bzl", "print_toolchains_checksums")
 load(":py_exec_tools_toolchain.bzl", "current_interpreter_executable")
 load(":stamp.bzl", "stamp_build_setting")
@@ -405,25 +403,6 @@
 
 print_toolchains_checksums(name = "print_toolchains_checksums")
 
-# Used for py_console_script_gen rule
-py_binary(
-    name = "py_console_script_gen_py",
-    srcs = ["py_console_script_gen.py"],
-    main = "py_console_script_gen.py",
-    visibility = [
-        "//visibility:public",
-    ],
-)
-
-py_library(
-    name = "py_console_script_gen_lib",
-    srcs = ["py_console_script_gen.py"],
-    imports = ["../.."],
-    visibility = [
-        "//tests/entry_points:__pkg__",
-    ],
-)
-
 # The current toolchain's interpreter as an excutable, usable with
 # executable=True attributes.
 current_interpreter_executable(
diff --git a/python/private/pypi/BUILD.bazel b/python/private/pypi/BUILD.bazel
index 8a86e44..f02d34a 100644
--- a/python/private/pypi/BUILD.bazel
+++ b/python/private/pypi/BUILD.bazel
@@ -13,6 +13,8 @@
 # limitations under the License.
 
 load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+load("@rules_python//python:defs.bzl", "py_library")
+load("//python:py_binary.bzl", "py_binary")
 load("//python/private:bzlmod_enabled.bzl", "BZLMOD_ENABLED")
 
 package(default_visibility = ["//:__subpackages__"])
@@ -305,3 +307,22 @@
     srcs = ["whl_target_platforms.bzl"],
     deps = [":parse_whl_name_bzl"],
 )
+
+# Used for py_console_script_gen rule
+py_binary(
+    name = "py_console_script_gen_py",
+    srcs = ["py_console_script_gen.py"],
+    main = "py_console_script_gen.py",
+    visibility = [
+        "//visibility:public",
+    ],
+)
+
+py_library(
+    name = "py_console_script_gen_lib",
+    srcs = ["py_console_script_gen.py"],
+    imports = ["../.."],
+    visibility = [
+        "//tests/entry_points:__pkg__",
+    ],
+)