Skip to content

Commit 8c5503c

Browse files
committed
Revert "fixup! fix(toolchain): do not force users to depend on optional toolchains"
This reverts commit c914a9e.
1 parent f9a6596 commit 8c5503c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/private/py_toolchain_suite.bzl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,16 @@ def py_toolchain_suite(*, prefix, user_repository_name, python_version, set_pyth
100100
**kwargs
101101
)
102102

103-
is_precompile_enabled = Label("//python/config_settings:is_precompile_enabled")
104103
native.toolchain(
105104
name = "{prefix}_py_exec_tools_toolchain".format(prefix = prefix),
106105
toolchain = "@{user_repository_name}//:py_exec_tools_toolchain".format(
107106
user_repository_name = user_repository_name,
108107
),
109108
toolchain_type = EXEC_TOOLS_TOOLCHAIN_TYPE,
109+
# The target settings capture the Python version
110110
target_settings = select({
111-
# NOTE: this is equivalent to (is_precompile_enabled AND target_settings)
112-
is_precompile_enabled: target_settings,
113-
"//conditions:default": [is_precompile_enabled],
111+
Label("//python/config_settings:is_precompile_enabled"): target_settings,
112+
"//conditions:default": [Label("//python/config_settings:is_precompile_enabled")],
114113
}),
115114
exec_compatible_with = kwargs.get("target_compatible_with"),
116115
)

0 commit comments

Comments
 (0)