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 1b6f6d798b.

* Revert "Fix openvino lib import error in linux"

This reverts commit fc5794eff8.

* Fix windows legal file
This commit is contained in:
Jack Zhou
2022-09-08 18:57:34 +08:00
committed by GitHub
parent 46a0b62ea5
commit eee5edad68

View File

@@ -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")))