aboutsummaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2015-06-27 01:30:45 +0200
committerChristian Tismer <tismer@stackless.com>2015-06-27 01:32:18 +0200
commit8c3ef5b32baeaf88352214cc917293b8a98f7a3a (patch)
tree722a0bd424f9afb73b3ead9b74ef51641db77d10 /utils.py
parente7f0215c79b7ccb631bc913c8cc9bb77cfe8a1cc (diff)
fix an old installer error with rpath.
This bug is old, but showed up after I tried to build parts of PySide for Qt5. Problem: There are rpath entries which don't trigger creation of an rpath command. This can be seen when Qt is not linked, and qtcore has an explicit path.
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/utils.py b/utils.py
index a1634a139..b8a40dd01 100644
--- a/utils.py
+++ b/utils.py
@@ -578,11 +578,17 @@ def osx_localize_libpaths(libpath, local_libs, enc_path=None):
install_names = osx_get_install_names(libpath)
need_rpath = False
for install_name in install_names:
- if install_name[0] in '/@':
+ if install_name[0] == '/':
+ # absolute path, nothing to do
continue
- back_tick('install_name_tool -change %s @rpath/%s %s' %
- (install_name, install_name, libpath))
+ # we possibly need to add an rpath command.
+ # note that a @rpath may be there already, but no rpath command.
+ # this happens when Qt is not linked (with qt5 this is the default)
need_rpath = True
+ if install_name[0] != '@':
+ # we need to change a relative path to @rpath
+ back_tick('install_name_tool -change {ina} @rpath/{ina} {lipa}'.format(
+ ina=install_name, lipa=libpath ))
if need_rpath and enc_path not in osx_get_rpaths(libpath):
- back_tick('install_name_tool -add_rpath %s %s' %
- (enc_path, libpath))
+ back_tick('install_name_tool -add_rpath {epa} {lipa}'.format(
+ epa=enc_path, lipa=libpath ))