From 451959c6ccd568169456cb5ab9b65626f0499531 Mon Sep 17 00:00:00 2001 From: yewentao256 Date: Mon, 1 Dec 2025 14:19:43 -0800 Subject: [PATCH] fix python install ci error Signed-off-by: yewentao256 --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index 0022e7fe0bf3..5818641a6277 100644 --- a/setup.py +++ b/setup.py @@ -310,6 +310,11 @@ def run(self): class precompiled_build_ext(build_ext): """Disables extension building when using precompiled binaries.""" + def finalize_options(self) -> None: + # use the project root as build_lib + super().finalize_options() + self.build_lib = str(ROOT_DIR) + def run(self) -> None: assert _is_cuda(), "VLLM_USE_PRECOMPILED is only supported for CUDA builds" @@ -640,6 +645,9 @@ def _read_requirements(filename: str) -> list[str]: if _build_custom_ops(): ext_modules.append(CMakeExtension(name="vllm._C")) +if envs.VLLM_USE_PRECOMPILED: + ext_modules = [ext for ext in ext_modules if ext.name != "vllm.triton_kernels"] + package_data = { "vllm": [ "py.typed",