From 543745dfdffb15d218d7f8dd001de2a4ba10f9e7 Mon Sep 17 00:00:00 2001 From: Alexey Zakhlestin Date: Fri, 4 Jun 2010 14:44:01 +0400 Subject: [PATCH] use "otool -L" instead of "ldd" on Darwin https://bugzilla.gnome.org/show_bug.cgi?id=606686 --- giscanner/shlibs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py index cac4fdf..563a55e 100644 --- a/giscanner/shlibs.py +++ b/giscanner/shlibs.py @@ -21,6 +21,7 @@ import re import subprocess +import platform from .utils import get_libtool_command, extract_libtool_shlib @@ -71,7 +72,10 @@ def _resolve_non_libtool(options, binary, libraries): if libtool: args.extend(libtool) args.append('--mode=execute') - args.extend(['ldd', binary.args[0]]) + if platform.system() == 'Darwin': + args.extend(['otool', '-L', binary.args[0]]) + else: + args.extend(['ldd', binary.args[0]]) proc = subprocess.Popen(args, stdout=subprocess.PIPE) patterns = {} for library in libraries: -- 2.7.4