Bug #58: handle @executable_path in macho dependencies

git-svn-id: http://svn.pyinstaller.org/trunk@661 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
giovannibajo
2009-05-13 10:06:47 +00:00
parent 6981284e6f
commit 30f1dfc8b4
+5 -1
View File
@@ -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: