@@ -319,17 +319,14 @@ class precompiled_wheel_utils:
319319 """Extracts libraries and other files from an existing wheel."""
320320
321321 @staticmethod
322- def extract_precompiled_and_patch_package (
323- wheel_url_or_path : str , download_filename : str | None
324- ) -> dict :
322+ def extract_precompiled_and_patch_package (wheel_url_or_path : str ) -> dict :
325323 import tempfile
326324 import zipfile
327325
328326 temp_dir = None
329327 try :
330328 if not os .path .isfile (wheel_url_or_path ):
331- # use provided filename first, then derive from URL
332- wheel_filename = download_filename or wheel_url_or_path .split ("/" )[- 1 ]
329+ wheel_filename = wheel_url_or_path .split ("/" )[- 1 ]
333330 temp_dir = tempfile .mkdtemp (prefix = "vllm-wheels" )
334331 wheel_path = os .path .join (temp_dir , wheel_filename )
335332 print (f"Downloading wheel from { wheel_url_or_path } to { wheel_path } " )
@@ -676,8 +673,7 @@ def _fetch_metadata_for_variant(
676673 wheel_location = os .getenv ("VLLM_PRECOMPILED_WHEEL_LOCATION" , None )
677674 if wheel_location is not None :
678675 wheel_url = wheel_location
679- download_filename = None
680- logger .info ("Using user-specified precompiled wheel location: %s" , wheel_url )
676+ logger .info ("Using user-specified precompiled wheel location: {}" , wheel_url )
681677 else :
682678 import platform
683679
@@ -690,17 +686,17 @@ def _fetch_metadata_for_variant(
690686 precompiled_wheel_utils .get_base_commit_in_main_branch (),
691687 )
692688 logger .info (
693- "Using precompiled wheel commit %s with variant %s " , commit , variant
689+ "Using precompiled wheel commit {} with variant {} " , commit , variant
694690 )
695691 try_default = False
696- wheels , repo_url , download_filename = None , None , None
692+ wheels , repo_url = None , None
697693 try :
698694 wheels , repo_url = _fetch_metadata_for_variant (commit , variant )
699- except Exception :
695+ except Exception as e :
700696 logger .warning (
701- "Failed to fetch precompiled wheel metadata for variant %s " ,
697+ "Failed to fetch precompiled wheel metadata for variant {} " ,
702698 variant ,
703- exc_info = True ,
699+ exc_info = e ,
704700 )
705701 try_default = True # try outside handler to keep the stacktrace simple
706702 if try_default :
@@ -721,29 +717,26 @@ def _fetch_metadata_for_variant(
721717"platform_tag": "manylinux1_x86_64",
722718"variant": null,
723719"filename": "vllm-0.11.2.dev278+gdbc3d9991-cp38-abi3-manylinux1_x86_64.whl",
724- "path": "../vllm-0.11.2.dev278%2Bgdbc3d9991 -cp38-abi3-manylinux1_x86_64.whl"
720+ "path": "../vllm-0.11.2.dev278+gdbc3d9991 -cp38-abi3-manylinux1_x86_64.whl"
725721},
726722...]"""
727723 for wheel in wheels :
728- # TODO: maybe check more compatibility later? (python_tag, abi_tag, etc)
729724 if wheel .get ("package_name" ) == "vllm" and arch in wheel .get (
730725 "platform_tag" , ""
731726 ):
732- logger .info ("Found precompiled wheel metadata: %s " , wheel )
727+ logger .info ("Found precompiled wheel metadata: {} " , wheel )
733728 if "path" not in wheel :
734729 raise ValueError (f"Wheel metadata missing path: { wheel } " )
730+ # TODO: maybe check more compatibility later? (python_tag, abi_tag, etc)
735731 wheel_url = repo_url + wheel ["path" ]
736- download_filename = wheel .get ("filename" )
737- logger .info ("Using precompiled wheel URL: %s" , wheel_url )
732+ logger .info ("Using precompiled wheel URL: {}" , wheel_url )
738733 break
739734 else :
740735 raise ValueError (
741736 f"No precompiled vllm wheel found for architecture { arch } "
742737 f"from repo { repo_url } . All available wheels: { wheels } "
743738 )
744- patch = precompiled_wheel_utils .extract_precompiled_and_patch_package (
745- wheel_url , download_filename
746- )
739+ patch = precompiled_wheel_utils .extract_precompiled_and_patch_package (wheel_url )
747740 for pkg , files in patch .items ():
748741 package_data .setdefault (pkg , []).extend (files )
749742
0 commit comments