@@ -248,7 +248,7 @@ PLATFORMS = {
248
248
),
249
249
}
250
250
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 ):
252
252
"""Resolve the release URL for the requested interpreter version
253
253
254
254
Args:
@@ -276,7 +276,15 @@ def get_release_url(platform, python_version, base_url = DEFAULT_RELEASE_BASE_UR
276
276
build = "shared-install_only" if (WINDOWS_NAME in platform ) else "install_only" ,
277
277
)
278
278
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 )
280
288
281
289
def print_toolchains_checksums (name ):
282
290
native .genrule (
@@ -307,8 +315,8 @@ def _commands_for_version(python_version):
307
315
"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 (
308
316
python_version = python_version ,
309
317
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" ,
312
320
)
313
321
for platform in TOOL_VERSIONS [python_version ]["sha256" ].keys ()
314
322
])
0 commit comments