Skip to content

Commit 72cc1a7

Browse files
committed
Detect missing ldd on all systems.
1 parent c6c95fb commit 72cc1a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from distutils.command.build_ext import build_ext
1616
from distutils.command.install import install
1717
from distutils.command.install_lib import install_lib
18+
from distutils.spawn import find_executable
1819

1920
# Were we compiled --with-pydebug or with #define Py_DEBUG?
2021
COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
@@ -591,7 +592,7 @@ def detect_modules(self):
591592
readline_termcap_library = ""
592593
curses_library = ""
593594
# Determine if readline is already linked against curses or tinfo.
594-
if do_readline and platform != 'darwin': # OS X does not have ldd.
595+
if do_readline and find_executable('ldd'):
595596
fp = os.popen("ldd %s" % do_readline)
596597
for ln in fp:
597598
if 'curses' in ln:

0 commit comments

Comments
 (0)