From 2d4978a57e0addf55cde6113e9615ed064b72fb7 Mon Sep 17 00:00:00 2001 From: yihong Date: Sat, 22 Nov 2025 21:00:04 +0800 Subject: [PATCH] fix: clean up function never use in setup.py (#29061) Signed-off-by: yihong0618 --- setup.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/setup.py b/setup.py index 5591bcb132447..8871b04d8fc46 100644 --- a/setup.py +++ b/setup.py @@ -74,18 +74,6 @@ def is_ninja_available() -> bool: return which("ninja") is not None -def is_url_available(url: str) -> bool: - from urllib.request import urlopen - - status = None - try: - with urlopen(url) as f: - status = f.status - except Exception: - return False - return status == 200 - - class CMakeExtension(Extension): def __init__(self, name: str, cmake_lists_dir: str = ".", **kwa) -> None: super().__init__(name, sources=[], py_limited_api=True, **kwa) @@ -533,28 +521,6 @@ def get_nvcc_cuda_version() -> Version: return nvcc_cuda_version -def get_gaudi_sw_version(): - """ - Returns the driver version. - """ - # Enable console printing for `hl-smi` check - output = subprocess.run( - "hl-smi", - shell=True, - text=True, - capture_output=True, - env={"ENABLE_CONSOLE": "true"}, - ) - if output.returncode == 0 and output.stdout: - return ( - output.stdout.split("\n")[2] - .replace(" ", "") - .split(":")[1][:-1] - .split("-")[0] - ) - return "0.0.0" # when hl-smi is not available - - def get_vllm_version() -> str: # Allow overriding the version. This is useful to build platform-specific # wheels (e.g. CPU, TPU) without modifying the source.