From 86796cf2ddb65f011e1b7b2f7aa7a02f15bcd6a7 Mon Sep 17 00:00:00 2001 From: Mengqing Cao Date: Tue, 11 Feb 2025 20:17:43 +0800 Subject: [PATCH] [Misc][Build] Fix packages for finding submodule (#42) ### What this PR does / why we need it? fix packages for finding submodule. Before this pr, the wheel built by pip not contain submodule `ops` , thus will raise an `ImportError` when importing vllm ### How was this patch tested? 1. build vllm-ascend wheel by pip ```bash cd ./vllm-ascend pip wheel ./ --no-deps pip install vllm_ascend-0.1.dev11+g07f2a16.d20250211-py3-none-any.whl #change file name according to yours wheel. ``` 2. check vllm ```python import vllm ``` Signed-off-by: MengqingCao --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a2e0066..2553521 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ import os from typing import List -from setuptools import setup +from setuptools import find_packages, setup from setuptools_scm import get_version ROOT_DIR = os.path.dirname(__file__) @@ -95,7 +95,7 @@ setup( "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Information Analysis", ], - packages=['vllm_ascend'], + packages=find_packages(exclude=("docs", "examples", "tests*", "patch")), python_requires=">=3.9", install_requires=get_requirements(), extras_require={},