issue-sl-setup OS X Installer: readline module broken Changes for Issue6877 to enable the readline module to use the native OS X editline library instead of GNU readline introduce a problem for OS X installer builds or other builds using MACOSX_DEPLOYMENT_TARGET. The test in setup.py to determine whether to search for a non-system library is based solely on the OS level of the build system and not the minimum deployment target level. Without this patch to setup.py, 10.3- or 10.4-targeted installer builds on 10.5 or 10.6 will fail to search for the installer-supplied GNU readline *and* will be dynamically linked with the crippled 10.4u SDK version of editline, thereby causing the readline module to crash on all levels of OS X. The patch also corrects a incorrect version test in setup.py that causes builds on 10.6 to be flooded with OS X deprecation warnings. APPLIES py3k, trunk, 2.6 NOTE issue-sl-setup-py3k.txt (this file) py3k issue-sl-setup-trunk.txt trunk issue-sl-setup-26.txt 2.6 diff -r 593745b20300 setup.py --- setup.py Thu Mar 04 23:30:46 2010 -0800 +++ setup.py Fri Mar 05 00:52:06 2010 -0800 @@ -492,6 +492,9 @@ 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