summaryrefslogtreecommitdiff
path: root/giscanner/shlibs.py
diff options
context:
space:
mode:
authorAlexey Zakhlestin <indeyets@gmail.com>2010-06-04 14:44:01 +0400
committerJohan Dahlin <johan@gnome.org>2010-06-04 09:46:12 -0300
commit543745dfdffb15d218d7f8dd001de2a4ba10f9e7 (patch)
tree647bce6e5aceb12e1edc64a580336236e9c999da /giscanner/shlibs.py
parentfbc86ceae2553996a59e2e96be3c6afcece8fc55 (diff)
downloadgobject-introspection-543745dfdffb15d218d7f8dd001de2a4ba10f9e7.tar.gz
use "otool -L" instead of "ldd" on Darwin
https://bugzilla.gnome.org/show_bug.cgi?id=606686
Diffstat (limited to 'giscanner/shlibs.py')
-rw-r--r--giscanner/shlibs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
index cac4fdf2..563a55ea 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: