File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ def python_register_toolchains(
235235 python_version ,
236236 distutils = None ,
237237 distutils_content = None ,
238+ register_toolchains = True ,
238239 tool_versions = TOOL_VERSIONS ,
239240 ** kwargs ):
240241 """Convenience macro for users which does typical setup.
@@ -251,6 +252,7 @@ def python_register_toolchains(
251252 python_version: the Python version.
252253 distutils: see the distutils attribute in the python_repository repository rule.
253254 distutils_content: see the distutils_content attribute in the python_repository repository rule.
255+ register_toolchains: Whether or not to register the downloaded toolchains.
254256 tool_versions: a dict containing a mapping of version with SHASUM and platform info. If not supplied, the defaults
255257 in python/versions.bzl will be used
256258 **kwargs: passed to each python_repositories call.
@@ -282,10 +284,11 @@ def python_register_toolchains(
282284 strip_prefix = strip_prefix ,
283285 ** kwargs
284286 )
285- native .register_toolchains ("@{name}_toolchains//:{platform}_toolchain" .format (
286- name = name ,
287- platform = platform ,
288- ))
287+ if register_toolchains :
288+ native .register_toolchains ("@{name}_toolchains//:{platform}_toolchain" .format (
289+ name = name ,
290+ platform = platform ,
291+ ))
289292
290293 resolved_interpreter_os_alias (
291294 name = name ,
You can’t perform that action at this time.
0 commit comments