File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,18 @@ def is_ninja_available() -> bool:
6969 return which ("ninja" ) is not None
7070
7171
72+ def is_url_available (url : str ) -> bool :
73+ from urllib .request import urlopen
74+
75+ status = None
76+ try :
77+ with urlopen (url ) as f :
78+ status = f .status
79+ except Exception :
80+ return False
81+ return status == 200
82+
83+
7284class CMakeExtension (Extension ):
7385
7486 def __init__ (self , name : str , cmake_lists_dir : str = '.' , ** kwa ) -> None :
@@ -320,6 +332,10 @@ def run(self) -> None:
320332 if wheel_location is None :
321333 base_commit = self .get_base_commit_in_main_branch ()
322334 wheel_location = f"https://wheels.vllm.ai/{ base_commit } /vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl"
335+ # Fallback to nightly wheel if latest commit wheel is unavailable,
336+ # in this rare case, the nightly release CI hasn't finished on main.
337+ if not is_url_available (wheel_location ):
338+ wheel_location = "https://wheels.vllm.ai/nightly/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl"
323339
324340 import zipfile
325341
You can’t perform that action at this time.
0 commit comments