From a66273e325914687d822c08bfde1bff79f5c3679 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 23 Oct 2024 09:53:21 -0700 Subject: [PATCH] Refactor tf_wheel build rule: return wheel file instead of wheel containing folder. This change will enable future Bazel tests that use wheel build rule. PiperOrigin-RevId: 689003106 --- third_party/py/python_repo.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third_party/py/python_repo.bzl b/third_party/py/python_repo.bzl index ff1f4e8da..6fe63fb9c 100644 --- a/third_party/py/python_repo.bzl +++ b/third_party/py/python_repo.bzl @@ -14,6 +14,7 @@ def _python_repository_impl(ctx): ctx.file("BUILD", "") wheel_name = ctx.os.environ.get("WHEEL_NAME", "tensorflow") wheel_collab = ctx.os.environ.get("WHEEL_COLLAB", False) + macos_deployment_target = ctx.os.environ.get("MACOSX_DEPLOYMENT_TARGET", "") requirements = None for i in range(0, len(ctx.attr.requirements_locks)): @@ -58,7 +59,7 @@ Please check python_init_repositories() in your WORKSPACE file. ) if use_pywrap_rules: - print("!!!Using pywrap rules instead of directly creating .so objects!!!") + print("!!!Using pywrap rules instead of directly creating .so objects!!!") # buildifier: disable=print ctx.file( "py_version.bzl", @@ -70,6 +71,7 @@ WHEEL_COLLAB = "{wheel_collab}" REQUIREMENTS = "{requirements}" REQUIREMENTS_WITH_LOCAL_WHEELS = "{requirements_with_local_wheels}" USE_PYWRAP_RULES = {use_pywrap_rules} +MACOSX_DEPLOYMENT_TARGET = "{macos_deployment_target}" """.format( version = version, wheel_name = wheel_name, @@ -77,6 +79,7 @@ USE_PYWRAP_RULES = {use_pywrap_rules} requirements = str(requirements), requirements_with_local_wheels = requirements_with_local_wheels, use_pywrap_rules = use_pywrap_rules, + macos_deployment_target = macos_deployment_target, ), )