From eee5edad68c5a6e656221049345c4a4e78afd4d0 Mon Sep 17 00:00:00 2001 From: Jack Zhou Date: Thu, 8 Sep 2022 18:57:34 +0800 Subject: [PATCH] Fix openvino python lib error in windows (#207) * Fix openvino lib import error in linux * Fix windows legal file * Revert "Fix windows legal file" This reverts commit 1b6f6d798b3e4b7bc6e902a893d88c76a850f473. * Revert "Fix openvino lib import error in linux" This reverts commit fc5794eff880c08d8dd038c1ec6d9353e5b91379. * Fix windows legal file --- build_scripts/process_libraries.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build_scripts/process_libraries.py b/build_scripts/process_libraries.py index d1fd434f5..a57516e9f 100644 --- a/build_scripts/process_libraries.py +++ b/build_scripts/process_libraries.py @@ -121,8 +121,18 @@ def process_libraries(current_dir): package_data = list() if platform.system().lower() == "windows": + + def check_windows_legal_file(f): + # Note(zhoushunjie): Special case for some library + # File 'plugins.xml' is special case of openvino. + for special_file in ['plugins.xml']: + if special_file in f: + return True + return False + for f in all_files: - if f.endswith(".pyd") or f.endswith("lib") or f.endswith("dll"): + if f.endswith(".pyd") or f.endswith("lib") or f.endswith( + "dll") or check_windows_legal_file(f): package_data.append( os.path.relpath(f, os.path.join(current_dir, "fastdeploy")))