mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
@@ -31,6 +31,11 @@ def process_on_linux(current_dir):
|
||||
if f.count("fastdeploy") and f.count(".so") > 0:
|
||||
fd_libs.append(filename)
|
||||
|
||||
cmake_build_dir = os.path.join(current_dir, ".setuptools-cmake-build")
|
||||
patchelf_bin_path = os.path.join(cmake_build_dir, "third_libs/patchelf/bin/patchelf")
|
||||
if not os.path.exists(patchelf_bin_path):
|
||||
patchelf_bin_path = "patchelf"
|
||||
|
||||
third_libs_path = os.path.join(libs_path, "third_libs")
|
||||
|
||||
# remove some useless opencv file in python wheels to decrease package size
|
||||
@@ -58,7 +63,7 @@ def process_on_linux(current_dir):
|
||||
rpath = "$ORIGIN/" + rel_path
|
||||
rpaths.append(rpath)
|
||||
for lib in fd_libs:
|
||||
command = "patchelf --set-rpath '{}' {}".format(":".join(rpaths), lib)
|
||||
command = "{} --set-rpath '{}' {}".format(patchelf_bin_path, ":".join(rpaths), lib)
|
||||
if platform.machine() != 'sw_64' and platform.machine() != 'mips64':
|
||||
assert subprocess.Popen(
|
||||
command,
|
||||
|
Reference in New Issue
Block a user