Mercurial > cpython-lru_cache-weakref
diff setup.py @ 59458:b0b80ec2e3a0 legacy-trunk
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.
| author | Ronald Oussoren <ronaldoussoren@mac.com> |
|---|---|
| date | Mon, 08 Mar 2010 07:06:47 +0000 |
| parents | 04d3ae52ff73 |
| children | 38f2f5262b20 |
line wrap: on
line diff
--- a/setup.py Mon Mar 08 02:11:06 2010 +0000 +++ b/setup.py Mon Mar 08 07:06:47 2010 +0000 @@ -552,6 +552,9 @@ do_readline = self.compiler.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 @@ -1382,7 +1385,7 @@ if platform == 'darwin' and ("--disable-toolbox-glue" not in sysconfig.get_config_var("CONFIG_ARGS")): - if os.uname()[2] > '8.': + if int(os.uname()[2].split('.')[0]) >= 8: # We're on Mac OS X 10.4 or later, the compiler should # support '-Wno-deprecated-declarations'. This will # surpress deprecation warnings for the Carbon extensions,
