mirror of
https://github.com/python/cpython.git
synced 2025-08-15 06:10:47 +00:00
Backport the patch that enables linking the readline
module to libedit on OSX 10.5 or later. (Issue 6877)
This commit is contained in:
parent
e9608ad0e5
commit
8ed66ed712
4 changed files with 95 additions and 10 deletions
18
setup.py
18
setup.py
|
@ -556,16 +556,16 @@ class PyBuildExt(build_ext):
|
|||
|
||||
# readline
|
||||
do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
|
||||
if platform == 'darwin': # and os.uname()[2] < '9.':
|
||||
# MacOSX 10.4 has a broken readline. Don't try to build
|
||||
# the readline module unless the user has installed a fixed
|
||||
# readline package
|
||||
# FIXME: The readline emulation on 10.5 is better, but the
|
||||
# readline module doesn't compile out of the box.
|
||||
if find_file('readline/rlconf.h', inc_dirs, []) is None:
|
||||
do_readline = False
|
||||
if platform == 'darwin':
|
||||
os_release = int(os.uname()[2].split('.')[0])
|
||||
if os_release < 9:
|
||||
# MacOSX 10.4 has a broken readline. Don't try to build
|
||||
# the readline module unless the user has installed a fixed
|
||||
# readline package
|
||||
if find_file('readline/rlconf.h', inc_dirs, []) is None:
|
||||
do_readline = False
|
||||
if do_readline:
|
||||
if sys.platform == 'darwin':
|
||||
if platform == 'darwin' and os_release < 9:
|
||||
# In every directory on the search path search for a dynamic
|
||||
# library and then a static library, instead of first looking
|
||||
# for dynamic libraries on the entiry path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue