mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Detect missing ldd on all systems.
This commit is contained in:
parent
5e2b27b5e5
commit
4d32c9c114
1 changed files with 2 additions and 1 deletions
3
setup.py
3
setup.py
|
@ -15,6 +15,7 @@ from distutils.core import Extension, setup
|
||||||
from distutils.command.build_ext import build_ext
|
from distutils.command.build_ext import build_ext
|
||||||
from distutils.command.install import install
|
from distutils.command.install import install
|
||||||
from distutils.command.install_lib import install_lib
|
from distutils.command.install_lib import install_lib
|
||||||
|
from distutils.spawn import find_executable
|
||||||
|
|
||||||
# Were we compiled --with-pydebug or with #define Py_DEBUG?
|
# Were we compiled --with-pydebug or with #define Py_DEBUG?
|
||||||
COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
|
COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
|
||||||
|
@ -591,7 +592,7 @@ class PyBuildExt(build_ext):
|
||||||
readline_termcap_library = ""
|
readline_termcap_library = ""
|
||||||
curses_library = ""
|
curses_library = ""
|
||||||
# Determine if readline is already linked against curses or tinfo.
|
# Determine if readline is already linked against curses or tinfo.
|
||||||
if do_readline and platform != 'darwin': # OS X does not have ldd.
|
if do_readline and find_executable('ldd'):
|
||||||
fp = os.popen("ldd %s" % do_readline)
|
fp = os.popen("ldd %s" % do_readline)
|
||||||
for ln in fp:
|
for ln in fp:
|
||||||
if 'curses' in ln:
|
if 'curses' in ln:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue