[Misc] version control by setuptools_scm (#21)
make package version control by setuptools_scm to keep the same with vllm Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
1
.github/workflows/yapf.yml
vendored
1
.github/workflows/yapf.yml
vendored
@@ -48,6 +48,7 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
pip install toml
|
||||||
pip install yapf==0.32.0
|
pip install yapf==0.32.0
|
||||||
- name: Running yapf
|
- name: Running yapf
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -193,3 +193,6 @@ cython_debug/
|
|||||||
.pypirc
|
.pypirc
|
||||||
|
|
||||||
kernel_meta/
|
kernel_meta/
|
||||||
|
|
||||||
|
# version file generated by setuptools-scm
|
||||||
|
/vllm_ascend/_version.py
|
||||||
|
|||||||
11
pyproject.toml
Normal file
11
pyproject.toml
Normal file
@@ -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"
|
||||||
@@ -2,4 +2,5 @@ decorator
|
|||||||
pyyaml
|
pyyaml
|
||||||
scipy
|
scipy
|
||||||
setuptools
|
setuptools
|
||||||
torch_npu == 2.5.1rc1
|
setuptools-scm
|
||||||
|
torch-npu == 2.5.1rc1
|
||||||
|
|||||||
9
setup.py
9
setup.py
@@ -21,8 +21,15 @@ import os
|
|||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
from setuptools_scm import get_version
|
||||||
|
|
||||||
ROOT_DIR = os.path.dirname(__file__)
|
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:
|
def get_path(*filepath) -> str:
|
||||||
@@ -66,7 +73,7 @@ setup(
|
|||||||
name='vllm_ascend',
|
name='vllm_ascend',
|
||||||
# Follow:
|
# Follow:
|
||||||
# https://packaging.python.org/en/latest/specifications/version-specifiers
|
# https://packaging.python.org/en/latest/specifications/version-specifiers
|
||||||
version='0.1.0a1',
|
version=VERSION,
|
||||||
author="vLLM-Ascend team",
|
author="vLLM-Ascend team",
|
||||||
license="Apache 2.0",
|
license="Apache 2.0",
|
||||||
description=("vLLM Ascend backend plugin"),
|
description=("vLLM Ascend backend plugin"),
|
||||||
|
|||||||
Reference in New Issue
Block a user