diff --git a/tools/python/toolchain.bzl b/tools/python/toolchain.bzl index 02eafd695bbc20..ebb7cc344b96d1 100644 --- a/tools/python/toolchain.bzl +++ b/tools/python/toolchain.bzl @@ -42,11 +42,11 @@ def _py_runtime_pair_impl(ctx): py_runtime_pair = rule( implementation = _py_runtime_pair_impl, attrs = { - "py2_runtime": attr.label(providers = [PyRuntimeInfo], doc = """\ + "py2_runtime": attr.label(providers = [PyRuntimeInfo], cfg = "exec", doc = """\ The runtime to use for Python 2 targets. Must have `python_version` set to `PY2`. """), - "py3_runtime": attr.label(providers = [PyRuntimeInfo], doc = """\ + "py3_runtime": attr.label(providers = [PyRuntimeInfo], cfg = "exec", doc = """\ The runtime to use for Python 3 targets. Must have `python_version` set to `PY3`. """),