[Bugfix] Fix wrong vLLM version reported by pip install (proto-v* tag collision) (#57295)

Signed-off-by: RyanMa29 <ziyang.ma@intel.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ziyang Ma
2026-09-17 08:50:14 -07:00
committed by GitHub
co-authored by Bugen Zhao Codex
parent 6a7de3ba3a
commit d7e755c230
3 changed files with 37 additions and 4 deletions
+16 -1
View File
@@ -16,13 +16,28 @@ from setuptools_scm import get_version
ROOT_DIR = Path(__file__).resolve().parents[1]
VLLM_RS_BUILD_VERSION = "VLLM_RS_BUILD_VERSION"
# Select vLLM release tags, excluding crate tags such as "proto-v0.3.0".
VLLM_GIT_DESCRIBE_COMMAND = [
"git",
"describe",
"--dirty",
"--tags",
"--long",
"--abbrev=40",
"--match",
"v[0-9]*",
]
def prepare_build_environment() -> str | None:
"""Set the device-independent vLLM source version for Rust artifacts."""
version = os.getenv(VLLM_RS_BUILD_VERSION) or None
if version is None:
try:
version = get_version(root=ROOT_DIR)
version = get_version(
root=ROOT_DIR,
git_describe_command=VLLM_GIT_DESCRIBE_COMMAND,
)
except LookupError:
return None