summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2006-02-23 15:02:23 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2006-02-23 15:02:23 (GMT)
commit81ae235146a058446e5a2ff8b2722686b9e36cc3 (patch)
tree5969de1c26b7e50f6cd67280d74018073977b50c /setup.py
parentde540e228854e6ecaceedc7036a0f99e9941d350 (diff)
downloadcpython-81ae235146a058446e5a2ff8b2722686b9e36cc3.zip
cpython-81ae235146a058446e5a2ff8b2722686b9e36cc3.tar.gz
cpython-81ae235146a058446e5a2ff8b2722686b9e36cc3.tar.bz2
If the readline library is found try and determine whether it's the broken
MacOSX 10.4 readline, and don't build the readline module in that case.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 9eae126..149b940 100644
--- a/setup.py
+++ b/setup.py
@@ -447,7 +447,14 @@ class PyBuildExt(build_ext):
exts.append( Extension('rgbimg', ['rgbimgmodule.c']) )
# readline
- if self.compiler.find_library_file(lib_dirs, 'readline'):
+ do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
+ if platform == 'darwin':
+ # 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 not find_file('readline/rlconf.h', inc_dirs, []):
+ do_readline = False
+ if do_readline:
readline_libs = ['readline']
if self.compiler.find_library_file(lib_dirs,
'ncursesw'):