[TPU] patch TPU wheel build script to resolve metadata issue (#27279)

Signed-off-by: Johnny Yang <johnnyyang@google.com>
This commit is contained in:
Johnny Yang
2025-11-13 09:36:54 -08:00
committed by GitHub
parent 327c0a9a23
commit fdfd5075aa
2 changed files with 31 additions and 1 deletions

View File

@@ -545,7 +545,9 @@ 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.
if env_version := os.getenv("VLLM_VERSION_OVERRIDE"):
return env_version
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")
version = get_version(write_to="vllm/_version.py")
sep = "+" if "+" not in version else "." # dev versions might contain +