6161 "setuptools" : "" ,
6262 "wheel" : "" ,
6363 },
64+ "3.7" : {
65+ "pip" : "<24.1" ,
66+ "setuptools" : "" ,
67+ "wheel" : "" ,
68+ },
6469}
6570
6671# This is the oldest version of pip we will distribute as a zipapp.
@@ -292,7 +297,12 @@ def zipapp_location(pip_version: Version) -> Path:
292297 return zipapp_dir / f"pip-{ pip_version } .pyz"
293298
294299
295- def generate_zipapp (pip_version : Version , * , console : Console , pip_versions : Dict [Version , Tuple [str , str ]]) -> None :
300+ def generate_zipapp (
301+ pip_version : Version ,
302+ * ,
303+ console : Console ,
304+ pip_versions : Dict [Version , Tuple [str , str ]],
305+ ) -> None :
296306 wheel_url , wheel_hash = pip_versions [pip_version ]
297307 console .log (f" Downloading [green]{ Path (wheel_url ).name } " )
298308 original_wheel = download_wheel (wheel_url , wheel_hash )
@@ -326,7 +336,9 @@ def generate_zipapp(pip_version: Version, *, console: Console, pip_versions: Dic
326336 major , minor = map (int , m .groups ())
327337 console .log (f" Zipapp requires Python { py_req } " )
328338 else :
329- console .log (f" Python requirement { py_req } too complex - check skipped" )
339+ console .log (
340+ f" Python requirement { py_req } too complex - check skipped"
341+ )
330342
331343 # Write the main script
332344 # Use a ZipInfo object to ensure reproducibility - otherwise the current time
@@ -341,7 +353,9 @@ def generate_zipapp(pip_version: Version, *, console: Console, pip_versions: Dic
341353 # and we want a reproducible value, i.e., always use the same
342354 # newline format.
343355 template = Path ("templates" ) / "zipapp_main.py"
344- zipapp_main = template .read_text (encoding = "utf-8" ).format (major = major , minor = minor )
356+ zipapp_main = template .read_text (encoding = "utf-8" ).format (
357+ major = major , minor = minor
358+ )
345359 dest .writestr (main_info , zipapp_main )
346360
347361
0 commit comments