summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2009-09-20 14:53:22 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2009-09-20 14:53:22 (GMT)
commit2efd9247549064887b0206d4a57d2abda03384e8 (patch)
treeabc5516ea2c01ad39b789f03f1187a2df483bada /setup.py
parentf172f31e4f1ad74e31215138e56327af118603ef (diff)
downloadcpython-2efd9247549064887b0206d4a57d2abda03384e8.zip
cpython-2efd9247549064887b0206d4a57d2abda03384e8.tar.gz
cpython-2efd9247549064887b0206d4a57d2abda03384e8.tar.bz2
Merged revisions 74970 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74970 | ronald.oussoren | 2009-09-20 16:18:15 +0200 (Sun, 20 Sep 2009) | 7 lines Issue 6877: this patch makes it possible to link the readline extension to the libedit emulation of the readline API on OSX 10.5 or later. This also adds a minimal testsuite for readline to check that the history manipuation functions have the same interface with both C libraries. ........
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index a6aff54..ebe2344 100644
--- a/setup.py
+++ b/setup.py
@@ -493,16 +493,16 @@ class PyBuildExt(build_ext):
# readline
do_readline = self.compiler_obj.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 entire path.