mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-09 12:03:49 -05:00
Install GNU Readline on Darwin if the readline is broken (refs #23)
The `has_broken_mac_readline` checks the existence of `readline/rhconf.h`. This is the same mechanism as setup.py of CPython.
This commit is contained in:
@@ -723,6 +723,19 @@ build_package_mac_openssl() {
|
||||
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$pem_file"
|
||||
}
|
||||
|
||||
has_broken_mac_readline() {
|
||||
# MacOSX 10.4 has a broken readline.
|
||||
# https://github.com/yyuu/pyenv/issues/23
|
||||
local retval=1
|
||||
local conftest="$BUILD_PATH/has_broken_mac_readline.h"
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
echo "#include <readline/rlconf.h>" > "$conftest"
|
||||
cpp $CFLAGS $CPPFLAGS $LDFLAGS "$conftest" 1>/dev/null 2>&1 || retval=0
|
||||
rm -f "$conftest"
|
||||
fi
|
||||
return "$retval"
|
||||
}
|
||||
|
||||
# Post-install check for Python 2.5.x
|
||||
build_package_verify_py25() {
|
||||
build_package_verify_readline "$@"
|
||||
|
||||
Reference in New Issue
Block a user