@@ -248,7 +248,7 @@ PLATFORMS = {
248248 ),
249249}
250250
251- def get_release_url (platform , python_version , base_url = DEFAULT_RELEASE_BASE_URL , tool_versions = TOOL_VERSIONS ):
251+ def get_release_info (platform , python_version , base_url = DEFAULT_RELEASE_BASE_URL , tool_versions = TOOL_VERSIONS ):
252252 """Resolve the release URL for the requested interpreter version
253253
254254 Args:
@@ -276,7 +276,15 @@ def get_release_url(platform, python_version, base_url = DEFAULT_RELEASE_BASE_UR
276276 build = "shared-install_only" if (WINDOWS_NAME in platform ) else "install_only" ,
277277 )
278278 url = "/" .join ([base_url , release_filename ])
279- return (release_filename , url , strip_prefix )
279+
280+ patches = tool_versions [python_version ].get ("patches" , [])
281+ if type (patches ) == type ({}):
282+ if platform in patches .keys ():
283+ patches = patches [platform ]
284+ else :
285+ patches = []
286+
287+ return (release_filename , url , strip_prefix , patches )
280288
281289def print_toolchains_checksums (name ):
282290 native .genrule (
@@ -307,8 +315,8 @@ def _commands_for_version(python_version):
307315 "echo \" {python_version}: {platform}: $$(curl --location --fail {release_url_sha256} 2>/dev/null || curl --location --fail {release_url} 2>/dev/null | shasum -a 256 | awk '{{ print $$1 }}')\" " .format (
308316 python_version = python_version ,
309317 platform = platform ,
310- release_url = get_release_url (platform , python_version )[1 ],
311- release_url_sha256 = get_release_url (platform , python_version )[1 ] + ".sha256" ,
318+ release_url = get_release_info (platform , python_version )[1 ],
319+ release_url_sha256 = get_release_info (platform , python_version )[1 ] + ".sha256" ,
312320 )
313321 for platform in TOOL_VERSIONS [python_version ]["sha256" ].keys ()
314322 ])
0 commit comments