From 0d41f2e3c627a9497761749dc73fe8ebab4d9363 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:18:07 +0900 Subject: [PATCH] fixup! fix(render_pkg_aliases): correctly render when we have target_platforms set --- tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl b/tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl index eaa7e28286..ca1651aa1d 100644 --- a/tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl +++ b/tests/pypi/render_pkg_aliases/render_pkg_aliases_test.bzl @@ -130,6 +130,7 @@ load("@rules_python//python/private/pypi:config_settings.bzl", "config_settings" config_settings( name = "config_settings", python_versions = ["3.2"], + target_platforms = ["linux_x86_64"], visibility = ["//:__subpackages__"], )""", ) @@ -228,8 +229,8 @@ _tests.append(_test_get_python_versions) def _test_get_python_versions_with_target_platforms(env): got = get_whl_flag_versions( settings = [ - whl_config_setting(repo = "foo", version = "3.3", target_platforms = ["cp33_linux_x86_64"]), - whl_config_setting(repo = "foo", version = "3.2", target_platforms = ["cp32_linux_x86_64", "cp32_osx_aarch64"]), + whl_config_setting(version = "3.3", target_platforms = ["cp33_linux_x86_64"]), + whl_config_setting(version = "3.2", target_platforms = ["cp32_linux_x86_64", "cp32_osx_aarch64"]), ], ) want = { @@ -247,7 +248,6 @@ def _test_get_python_versions_from_filenames(env): got = get_whl_flag_versions( settings = [ whl_config_setting( - repo = "foo", version = "3.3", filename = "foo-0.0.0-py3-none-" + plat + ".whl", ) @@ -285,7 +285,6 @@ def _test_get_flag_versions_from_alias_target_platforms(env): got = get_whl_flag_versions( settings = [ whl_config_setting( - repo = "foo", version = "3.3", filename = "foo-0.0.0-py3-none-" + plat + ".whl", ) @@ -294,7 +293,6 @@ def _test_get_flag_versions_from_alias_target_platforms(env): ] ] + [ whl_config_setting( - repo = "foo", version = "3.3", filename = "foo-0.0.0-py3-none-any.whl", target_platforms = [