Skip to content

Commit

Permalink
[CI/Build] fix setuptools-scm usage (vllm-project#8771)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrifiro authored and kwang1012 committed Oct 13, 2024
1 parent 98a3b9e commit 7870b3b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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/
Expand Down Expand Up @@ -196,8 +196,5 @@ _build/
*_hip*
hip_compat.h

# version file generated by setuptools-scm
/vllm/_version.py

# Benchmark dataset
benchmarks/*.json
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ ignore = [
"UP032",
]

[tool.setuptools_scm]
version_file = "vllm/_version.py"

[tool.mypy]
python_version = "3.8"

Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7870b3b

Please sign in to comment.