Use RPATH instead of RUNPATH for wheel package (#20239)

This commit is contained in:
Ilya Lavrenov 2023-10-06 13:50:44 +04:00 committed by GitHub
parent 7c847cecba
commit 5764b5c108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -512,7 +512,7 @@ def set_rpath(rpath, binary):
log.warn(f"WARNING: {binary}: missed ELF header")
return
rpath_tool = "patchelf"
cmd = [rpath_tool, "--set-rpath", rpath, binary]
cmd = [rpath_tool, "--set-rpath", rpath, binary, "--force-rpath"]
elif sys.platform == "darwin":
rpath_tool = "install_name_tool"
cmd = [rpath_tool, "-add_rpath", rpath, binary]