[CI/Build] fix setuptools-scm usage (#8771)

This commit is contained in:
Daniele 2024-09-24 21:38:12 +02:00 committed by GitHub
parent 72fc97a0f1
commit 2467b642dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 10 deletions

7
.gitignore vendored
View File

@ -1,5 +1,5 @@
# vllm commit id, generated by setup.py
vllm/commit_id.py
# version file generated by setuptools-scm
/vllm/_version.py
# vllm-flash-attn built from source
vllm/vllm_flash_attn/
@ -196,8 +196,5 @@ _build/
*_hip*
hip_compat.h
# version file generated by setuptools-scm
/vllm/_version.py
# Benchmark dataset
benchmarks/*.json

View File

@ -51,9 +51,6 @@ ignore = [
"UP032",
]
[tool.setuptools_scm]
version_file = "vllm/_version.py"
[tool.mypy]
python_version = "3.8"

View File

@ -354,12 +354,15 @@ def get_path(*filepath) -> str:
def get_vllm_version() -> str:
version = get_version()
version = get_version(
write_to="vllm/_version.py", # TODO: move this to pyproject.toml
)
sep = "+" if "+" not in version else "." # dev versions might contain +
if _no_device():
if envs.VLLM_TARGET_DEVICE == "empty":
version += "+empty"
version += f"{sep}empty"
elif _is_cuda():
cuda_version = str(get_nvcc_cuda_version())
if cuda_version != MAIN_CUDA_VERSION: