From 70b973fdd474d1761aa64b033e1bb772a1461eaa Mon Sep 17 00:00:00 2001 From: Pedro Fonini Date: Thu, 22 May 2025 01:58:25 -0300 Subject: [PATCH] Fix python-build's `has_broken_mac_readline` when Readline is explicitly configured (#3254) --- plugins/python-build/bin/python-build | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index a5dd3e6a..e76ac01c 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1585,13 +1585,15 @@ use_freebsd_pkg() { has_broken_mac_readline() { # Mac OS X 10.4 has broken readline. # https://github.com/pyenv/pyenv/issues/23 - if is_mac && ! configured_with_package_dir "python" "readline/rlconf.h"; then - if can_use_homebrew; then - use_homebrew_readline && return 1 - fi - if can_use_macports; then - use_macports_readline && return 1 - fi + if ! is_mac || configured_with_package_dir "python" "readline/rlconf.h"; then + # Not applicable. + return 1 + fi + if can_use_homebrew; then + use_homebrew_readline && return 1 + fi + if can_use_macports; then + use_macports_readline && return 1 fi }