From 7b8d9c1b0d160a38b04d73cc6d14dbbd2a28ba48 Mon Sep 17 00:00:00 2001 From: xingyuan li <108672484+hoshibara@users.noreply.github.com> Date: Thu, 20 Jul 2023 14:20:08 +0900 Subject: [PATCH] [LLM] Add dependency file check in setup.py (#8565) * add package file check --- python/llm/setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/llm/setup.py b/python/llm/setup.py index 8f1e43f7..8913a758 100644 --- a/python/llm/setup.py +++ b/python/llm/setup.py @@ -223,6 +223,13 @@ def setup_package(): for url in lib_urls[platform_name]: download_libs(url, change_permission=change_permission) + + # Check if all package files are ready + for file in package_data[platform_name]: + file_path = os.path.join(libs_dir, os.path.basename(file)) + if not os.path.exists(file_path): + print(f'Could not find package dependency file: {file_path}') + raise FileNotFoundError(f'Could not find package dependency file: {file_path}') all_requires = ['py-cpuinfo'] all_requires += CONVERT_DEP