Skip to content

Commit

Permalink
setup.py: fix sdist builds
Browse files Browse the repository at this point in the history
Signed-off-by: Daniele Trifirò <[email protected]>
  • Loading branch information
dtrifiro committed Jan 22, 2025
1 parent 8b493cf commit ccc246d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,11 @@ def get_vllm_version() -> str:
write_to="vllm/_version.py", # TODO: move this to pyproject.toml
)

sep = "+" if "+" not in version else "." # dev versions might contain +
if "sdist" in sys.argv:
# skip local version specifiers for source distribution builds
return version

sep = "+" if "+" not in version else "." # dev versions might already contain local version specifiers

Check failure on line 484 in setup.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (E501)

setup.py:484:81: E501 Line too long (107 > 80)

if _no_device():
if envs.VLLM_TARGET_DEVICE == "empty":
Expand All @@ -489,9 +493,7 @@ def get_vllm_version() -> str:
cuda_version = str(get_nvcc_cuda_version())
if cuda_version != MAIN_CUDA_VERSION:
cuda_version_str = cuda_version.replace(".", "")[:3]
# skip this for source tarball, required for pypi
if "sdist" not in sys.argv:
version += f"{sep}cu{cuda_version_str}"
version += f"{sep}cu{cuda_version_str}"
elif _is_hip():
import torch

Expand Down

0 comments on commit ccc246d

Please sign in to comment.