Issue #7384: On Gentoo, libreadline.so is a "fake library", so ldd fails.

In that case, do not attempt to parse stderr output.
This commit is contained in:
Stefan Krah 2010-07-17 11:46:52 +00:00
parent 45bf773f60
commit f4e7a35d64

View file

@ -534,7 +534,8 @@ class PyBuildExt(build_ext):
tmpfile = os.path.join(self.build_temp, 'readline_termcap_lib')
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
os.system("ldd %s > %s" % (do_readline, tmpfile))
ret = os.system("ldd %s > %s" % (do_readline, tmpfile))
if ret >> 8 == 0:
fp = open(tmpfile)
for ln in fp:
if 'curses' in ln: