From e57b4edc9106d4abc21c43e71561b666d2a2cd7c Mon Sep 17 00:00:00 2001 From: renren247 Date: Wed, 26 Mar 2025 18:08:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E5=AF=BC=E5=85=A5vllm?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E7=89=88=E6=9C=AC=E5=8F=B7=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98https://github.com/vllm-project/vllm?= =?UTF-8?q?/issues/9421=202.spec=E9=80=82=E9=85=8Dopeneuler22.03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vllm.spec | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/vllm.spec b/vllm.spec index be80680..cc5f9d6 100644 --- a/vllm.spec +++ b/vllm.spec @@ -3,7 +3,7 @@ Name: vllm Version: 0.6.6.post1 -Release: 1 +Release: 2 Summary: Powerful engine for LLMs License: (Apache-2.0 AND BSD-3-Clause) OR BSD-3-CLause URL: https://github.com/vllm-project/vllm @@ -16,8 +16,8 @@ BuildArch: noarch %package -n python3-%{_name} Summary: %{summary} -Buildrequires: cmake >= 3.26 python3-pip python3-devel python3-setuptools python3-pytest -Buildrequires: python3-setuptools_scm python3-wheel python3-pytest-asyncio python3-grpcio +Buildrequires: cmake python3-pip python3-devel python3-setuptools python3-pytest +Buildrequires: python3-setuptools_scm python3-wheel python3-grpcio Buildrequires: python3-pytorch %{?python_provide:%python_provide python3-%{_name}} @@ -30,12 +30,21 @@ Buildrequires: python3-pytorch %autosetup -n %{name}-%{version} -N %build +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} export VLLM_TARGET_DEVICE=empty %py3_build %install +export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} export VLLM_TARGET_DEVICE=empty %py3_install + +VERSION_FILE=$(find %{buildroot} -name '_version.py') +if [ -f "$VERSION_FILE" ]; then + sed -i 's/^version = /__version__ = /g' "$VERSION_FILE" + sed -i 's/^version_tuple = /__version_tuple__ = /g' "$VERSION_FILE" +fi + pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst @@ -60,5 +69,8 @@ mv %{buildroot}/filelist.lst . %files -n python3-%{_name} -f filelist.lst %changelog +* Thu Mar 27 2025 renwenjie - 0.6.6.post1-2 +- solve 'no module named vllm._version' problem and adapted for openeuler22.03 + * Fri Feb 28 2025 renwenjie - 0.6.6.post1-1 - Package init -- Gitee