mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
@@ -440,6 +440,12 @@ install(
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/examples
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
if(NOT WIN32)
|
||||
install(
|
||||
FILES ${PROJECT_SOURCE_DIR}/scripts/fastdeploy_init.sh
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_FASTDEPLOY_PYTHON)
|
||||
add_definitions(-DBUILD_FASTDEPLOY_PYTHON)
|
||||
|
@@ -17,7 +17,7 @@ endfunction()
|
||||
function(download_and_decompress url filename decompress_dir)
|
||||
if(NOT EXISTS ${filename})
|
||||
message("Downloading file from ${url} to ${filename} ...")
|
||||
file(DOWNLOAD ${url} "${filename}.tmp")
|
||||
file(DOWNLOAD ${url} "${filename}.tmp" SHOW_PROGRESS)
|
||||
file(RENAME "${filename}.tmp" ${filename})
|
||||
endif()
|
||||
if(NOT EXISTS ${decompress_dir})
|
||||
|
@@ -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