Skip to content

Commit 2b30b54

Browse files
committed
wire platform_release back to osx flag
1 parent 5316f2a commit 2b30b54

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

python/private/pypi/env_marker_setting.bzl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ def _env_marker_setting_impl(ctx):
9494
# https://peps.python.org/pep-0738/#platform
9595
# Similar for iOS:
9696
# https://peps.python.org/pep-0730/#platform
97-
env["platform_release"] = ctx.attr.platform_release
97+
platform_release = ctx.attr.platform_release
98+
if platform_release == "USE_OSX_VERSION_FLAG":
99+
platform_release = _get_flag(ctx.attr._pip_whl_osx_version_flag)
100+
env["platform_release"] = platform_release
98101
env["platform_system"] = ctx.attr.platform_system
99102

100103
# For lack of a better option, just use an empty string for now.
@@ -127,6 +130,10 @@ for the specification of behavior.
127130
"platform_release": attr.string(),
128131
"platform_system": attr.string(),
129132
"sys_platform": attr.string(),
133+
"_pip_whl_osx_version_flag": attr.label(
134+
default = "//python/config_settings:pip_whl_osx_version",
135+
providers = [[BuildSettingInfo], [config_common.FeatureFlagInfo]],
136+
),
130137
"_python_full_version_flag": attr.label(
131138
default = "//python/config_settings:python_version",
132139
providers = [config_common.FeatureFlagInfo],

0 commit comments

Comments
 (0)