[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:
co-authored by
Bugen Zhao
Codex
parent
6a7de3ba3a
commit
d7e755c230
@@ -418,7 +418,7 @@ validate_ci_build_context_source() {
|
||||
|
||||
describe_ci_revision() {
|
||||
git -C "$1" describe --tags --long --abbrev=10 \
|
||||
--match '*[0-9]*' "$2" 2>/dev/null
|
||||
--match 'v[0-9]*' "$2" 2>/dev/null
|
||||
}
|
||||
|
||||
write_ci_git_archival_metadata() {
|
||||
|
||||
@@ -22,6 +22,18 @@ from setuptools_rust.build import build_rust
|
||||
from setuptools_scm import get_version
|
||||
from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME
|
||||
|
||||
# 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 load_module_from_path(module_name, path):
|
||||
spec = importlib.util.spec_from_file_location(module_name, path)
|
||||
@@ -1249,9 +1261,15 @@ def get_vllm_version() -> str:
|
||||
if env_version := os.getenv("VLLM_VERSION_OVERRIDE"):
|
||||
print(f"Overriding VLLM version with {env_version} from VLLM_VERSION_OVERRIDE")
|
||||
os.environ["SETUPTOOLS_SCM_PRETEND_VERSION"] = env_version
|
||||
return get_version(write_to="vllm/_version.py")
|
||||
return get_version(
|
||||
write_to="vllm/_version.py",
|
||||
git_describe_command=VLLM_GIT_DESCRIBE_COMMAND,
|
||||
)
|
||||
|
||||
version = get_version(write_to="vllm/_version.py")
|
||||
version = get_version(
|
||||
write_to="vllm/_version.py",
|
||||
git_describe_command=VLLM_GIT_DESCRIBE_COMMAND,
|
||||
)
|
||||
sep = "+" if "+" not in version else "." # dev versions might contain +
|
||||
|
||||
if not envs.VLLM_SKIP_VERSION_SUFFIX:
|
||||
|
||||
+16
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user