diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-11-03 14:27:50 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-11-15 15:47:04 +0000 |
commit | a7f3f7d3e711520a32f87aace8df265589a649e7 (patch) | |
tree | 3e67a31b9c5d939481d9f8bcc2d4f7ff125e340a /setup.py | |
parent | 8815ef1cfddd79b99314a8e8e351b1a2235afc26 (diff) |
Fix rpath handling on Linux
In addition to adding $ORIGIN, add an RPATH to the Qt lib directory
(the one used when building PySide) so that there is no necessity to
set LD_LIBRARY_PATH.
Change-Id: I0d54da2ef084abbe503bd427b0773481264334e6
Task-number: PYSIDE-558
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1355,7 +1355,16 @@ class pyside_build(_build): patchelf_path = os.path.join(self.script_dir, "patchelf") def rpath_cmd(srcpath): - cmd = [patchelf_path, '--set-rpath', '$ORIGIN/', srcpath] + final_rpath = '' + # Command line rpath option takes precedence over automatically added one. + if OPTION_RPATH_VALUES: + final_rpath = OPTION_RPATH_VALUES + else: + # Add rpath values pointing to $ORIGIN and the installed qt lib directory. + local_rpath = '$ORIGIN/' + qt_lib_dir = self.qtinfo.libs_dir + final_rpath = local_rpath + ':' + qt_lib_dir + cmd = [patchelf_path, '--set-rpath', final_rpath, srcpath] if run_process(cmd) != 0: raise RuntimeError("Error patching rpath in " + srcpath) |