Skip to content

Commit b909767

Browse files
dtrifiroLeiWang1999
authored andcommitted
[CI/Build] fix setuptools-scm usage (vllm-project#8771)
Signed-off-by: LeiWang1999 <[email protected]>
1 parent 00edda8 commit b909767

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.gitignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# vllm commit id, generated by setup.py
2-
vllm/commit_id.py
1+
# version file generated by setuptools-scm
2+
/vllm/_version.py
33

44
# vllm-flash-attn built from source
55
vllm/vllm_flash_attn/
@@ -196,9 +196,6 @@ _build/
196196
*_hip*
197197
hip_compat.h
198198

199-
# version file generated by setuptools-scm
200-
/vllm/_version.py
201-
202199
# Benchmark dataset
203200
benchmarks/*.json
204201

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ ignore = [
5151
"UP032",
5252
]
5353

54-
[tool.setuptools_scm]
55-
version_file = "vllm/_version.py"
56-
5754
[tool.mypy]
5855
python_version = "3.8"
5956

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,15 @@ def get_path(*filepath) -> str:
354354

355355

356356
def get_vllm_version() -> str:
357-
version = get_version()
357+
version = get_version(
358+
write_to="vllm/_version.py", # TODO: move this to pyproject.toml
359+
)
360+
358361
sep = "+" if "+" not in version else "." # dev versions might contain +
359362

360363
if _no_device():
361364
if envs.VLLM_TARGET_DEVICE == "empty":
362-
version += "+empty"
365+
version += f"{sep}empty"
363366
elif _is_cuda():
364367
cuda_version = str(get_nvcc_cuda_version())
365368
if cuda_version != MAIN_CUDA_VERSION:

0 commit comments

Comments
 (0)