Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] version control by setuptools_scm #21

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/yapf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml
pip install yapf==0.32.0
- name: Running yapf
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,6 @@ cython_debug/
.pypirc

kernel_meta/

# version file generated by setuptools-scm
/vllm_ascend/_version.py
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
# Should be mirrored in requirements.txt
requires = [
"setuptools>=64",
"setuptools-scm>=8",
"decorator",
"pyyaml",
"scipy",
"torch-npu == 2.5.1rc1"
]
build-backend = "setuptools.build_meta"
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ decorator
pyyaml
scipy
setuptools
torch_npu == 2.5.1rc1
setuptools-scm
torch-npu == 2.5.1rc1
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@
from typing import List

from setuptools import setup
from setuptools_scm import get_version

ROOT_DIR = os.path.dirname(__file__)
try:
VERSION = get_version(write_to="vllm_ascend/_version.py")
except LookupError:
# The checkout action in github action CI does not checkout the tag. It
# only checks out the commit. In this case, we set a dummy version.
VERSION = "0.0.0"


def get_path(*filepath) -> str:
Expand Down Expand Up @@ -66,7 +73,7 @@ def _read_requirements(filename: str) -> List[str]:
name='vllm_ascend',
# Follow:
# https://packaging.python.org/en/latest/specifications/version-specifiers
version='0.1.0a1',
version=VERSION,
author="vLLM-Ascend team",
license="Apache 2.0",
description=("vLLM Ascend backend plugin"),
Expand Down