From 9b2b70adba5431162401a97b2bbab1dc938e7245 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 6 Dec 2024 15:58:32 -0800 Subject: [PATCH] chore: use per-rule loads in pip_compile.bzl (#2473) This is for overall code hygiene, but also because it seems to make some progress on Bazel 9 being able to load files in WORKSPACE mode (something about defs.bzl triggers loading more symbols which can't be found) Work towards https://github.com/bazelbuild/rules_python/issues/2469 --- python/private/pypi/BUILD.bazel | 3 ++- python/private/pypi/pip_compile.bzl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/private/pypi/BUILD.bazel b/python/private/pypi/BUILD.bazel index 2cc073a832..7e2d398fde 100644 --- a/python/private/pypi/BUILD.bazel +++ b/python/private/pypi/BUILD.bazel @@ -218,7 +218,8 @@ bzl_library( srcs = ["pip_compile.bzl"], deps = [ ":deps_bzl", - "//python:defs_bzl", + "//python:py_binary_bzl", + "//python:py_test_bzl", ], ) diff --git a/python/private/pypi/pip_compile.bzl b/python/private/pypi/pip_compile.bzl index dc5b186a6a..8e46947b99 100644 --- a/python/private/pypi/pip_compile.bzl +++ b/python/private/pypi/pip_compile.bzl @@ -19,7 +19,8 @@ NOTE @aignas 2024-06-23: We are using the implementation specific name here to make it possible to have multiple tools inside the `pypi` directory """ -load("//python:defs.bzl", _py_binary = "py_binary", _py_test = "py_test") +load("//python:py_binary.bzl", _py_binary = "py_binary") +load("//python:py_test.bzl", _py_test = "py_test") def pip_compile( name,