From 30f1dfc8b4777b0a2a6a46791fa3ada7788809d6 Mon Sep 17 00:00:00 2001 From: giovannibajo Date: Wed, 13 May 2009 10:06:47 +0000 Subject: [PATCH] Bug #58: handle @executable_path in macho dependencies git-svn-id: http://svn.pyinstaller.org/trunk@661 8dd32b29-ccff-0310-8a9a-9233e24343b1 --- bindepend.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bindepend.py b/bindepend.py index bb93c57..b5d0a3f 100755 --- a/bindepend.py +++ b/bindepend.py @@ -85,7 +85,7 @@ excludes = { r'^/lib/tls':1, # libGL can reference some hw specific libraries (like nvidia libs) r'/usr/lib/libGL.*':1, - # + # '^/System/Library/Frameworks':1, } @@ -359,6 +359,10 @@ def _getImports_otool(pth): m = re.search(r"\s+(.*?)\s+\(.*\)", line) if m: lib = m.group(1) + if lib.startswith("@executable_path"): + rel_path = lib.replace("@executable_path",".") + rel_path = os.path.join(os.path.dirname(pth), rel_path) + lib = os.path.abspath(rel_path) if os.path.exists(lib): rslt.append(lib) else: