mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Be extra careful with linking against libtermcap. This is now only done
if we can find the libtermcap in the usual places. Some platforms don't have libtermcap, e.g. MacOSX.
This commit is contained in:
parent
7c6fcda7bf
commit
2efc3238d7
1 changed files with 7 additions and 2 deletions
9
setup.py
9
setup.py
|
|
@ -242,10 +242,15 @@ class PyBuildExt(build_ext):
|
|||
exts.append( Extension('rgbimg', ['rgbimgmodule.c']) )
|
||||
|
||||
# readline
|
||||
if (self.compiler.find_library_file(lib_dirs, 'readline')):
|
||||
if self.compiler.find_library_file(lib_dirs, 'readline'):
|
||||
readline_libs = ['readline']
|
||||
if self.compiler.find_library_file(lib_dirs +
|
||||
['/usr/lib/termcap'],
|
||||
'termcap'):
|
||||
readline_libs.append('termcap')
|
||||
exts.append( Extension('readline', ['readline.c'],
|
||||
library_dirs=['/usr/lib/termcap'],
|
||||
libraries=['readline', 'termcap']) )
|
||||
libraries=readline_libs) )
|
||||
|
||||
# The crypt module is now disabled by default because it breaks builds
|
||||
# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue