[CI/Build] fix setuptools-scm usage (#8771)
This commit is contained in:
parent
72fc97a0f1
commit
2467b642dd
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
# vllm commit id, generated by setup.py
|
# version file generated by setuptools-scm
|
||||||
vllm/commit_id.py
|
/vllm/_version.py
|
||||||
|
|
||||||
# vllm-flash-attn built from source
|
# vllm-flash-attn built from source
|
||||||
vllm/vllm_flash_attn/
|
vllm/vllm_flash_attn/
|
||||||
@ -196,8 +196,5 @@ _build/
|
|||||||
*_hip*
|
*_hip*
|
||||||
hip_compat.h
|
hip_compat.h
|
||||||
|
|
||||||
# version file generated by setuptools-scm
|
|
||||||
/vllm/_version.py
|
|
||||||
|
|
||||||
# Benchmark dataset
|
# Benchmark dataset
|
||||||
benchmarks/*.json
|
benchmarks/*.json
|
||||||
|
@ -51,9 +51,6 @@ ignore = [
|
|||||||
"UP032",
|
"UP032",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.setuptools_scm]
|
|
||||||
version_file = "vllm/_version.py"
|
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.8"
|
python_version = "3.8"
|
||||||
|
|
||||||
|
7
setup.py
7
setup.py
@ -354,12 +354,15 @@ def get_path(*filepath) -> str:
|
|||||||
|
|
||||||
|
|
||||||
def get_vllm_version() -> 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 +
|
sep = "+" if "+" not in version else "." # dev versions might contain +
|
||||||
|
|
||||||
if _no_device():
|
if _no_device():
|
||||||
if envs.VLLM_TARGET_DEVICE == "empty":
|
if envs.VLLM_TARGET_DEVICE == "empty":
|
||||||
version += "+empty"
|
version += f"{sep}empty"
|
||||||
elif _is_cuda():
|
elif _is_cuda():
|
||||||
cuda_version = str(get_nvcc_cuda_version())
|
cuda_version = str(get_nvcc_cuda_version())
|
||||||
if cuda_version != MAIN_CUDA_VERSION:
|
if cuda_version != MAIN_CUDA_VERSION:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user