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:
69
69
return which ("ninja" ) is not None
70
70
71
71
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
+
72
84
class CMakeExtension (Extension ):
73
85
74
86
def __init__ (self , name : str , cmake_lists_dir : str = '.' , ** kwa ) -> None :
@@ -320,6 +332,10 @@ def run(self) -> None:
320
332
if wheel_location is None :
321
333
base_commit = self .get_base_commit_in_main_branch ()
322
334
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"
323
339
324
340
import zipfile
325
341
You can’t perform that action at this time.
0 commit comments