summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-03-08 07:06:47 +0000
committerRonald Oussoren <ronaldoussoren@mac.com>2010-03-08 07:06:47 +0000
commit05b0d1d04856e159059589c06df43bc3939b7a09 (patch)
treeb3ab31fba4f543e89c9443b649998338cf4dd661 /setup.py
parentcd0ace391c140ce5f2135d7f291d672fb4891d88 (diff)
downloadcpython-git-05b0d1d04856e159059589c06df43bc3939b7a09.tar.gz
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.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index c65f286007..a86ae1c743 100644
--- a/setup.py
+++ b/setup.py
@@ -552,6 +552,9 @@ class PyBuildExt(build_ext):
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 @@ class PyBuildExt(build_ext):
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,