]> granicus.if.org Git - python/commitdiff
Merged revisions 78784 via svnmerge from
authorRonald Oussoren <ronaldoussoren@mac.com>
Mon, 8 Mar 2010 07:09:59 +0000 (07:09 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Mon, 8 Mar 2010 07:09:59 +0000 (07:09 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78784 | ronald.oussoren | 2010-03-08 08:06:47 +0100 (Mon, 08 Mar 2010) | 3 lines

  Fix for issue 8066: readline should not be linked against libedit when the
  deployment target is 10.4, libedit on 10.4 is too broken.
........

setup.py

index 8ca58588ff2c78979021bba91a99737d2867aca8..5c1b38230e99237e4c7df8cc8442baeb4af7c691 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -492,6 +492,9 @@ class PyBuildExt(build_ext):
         do_readline = self.compiler_obj.find_library_file(lib_dirs, 'readline')
         if platform == 'darwin':
             os_release = int(os.uname()[2].split('.')[0])
+            dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
+            if dep_target and dep_target.split('.') < ['10', '5']:
+                os_release = 8
             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