Prefer tcl-tk@8 from Homebrew
Since 10.11.2024, Homebrew upgraded tck-tk to 9.0 which CPython is not compatible with yet
This commit is contained in:
parent
0f8b2b2b84
commit
75358a2ce5
@ -1671,8 +1671,12 @@ use_xcode_sdk_zlib() {
|
||||
|
||||
use_homebrew_tcltk() {
|
||||
can_use_homebrew || return 1
|
||||
# get the version from the folder that homebrew versions
|
||||
local tcltk_libdir="$(brew --prefix tcl-tk 2>/dev/null || true)"
|
||||
# Since https://github.com/Homebrew/homebrew-core/commit/f10e88617b41555193c22fdcba6109fe82155ee2 (10.11.2024),
|
||||
# tcl-tk is 9.0 which is not compatible with CPython as of this writing
|
||||
# but we'll keep it as backup for cases like non-updated Homebrew
|
||||
local tcltk
|
||||
for tcltk in "tcl-tk@8" "tcl-tk"; do
|
||||
local tcltk_libdir="$(brew --prefix "${tcltk}" 2>/dev/null || true)"
|
||||
if [ -d "$tcltk_libdir" ]; then
|
||||
echo "python-build: use tcl-tk from homebrew"
|
||||
if [[ -z "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then
|
||||
@ -1689,7 +1693,10 @@ use_homebrew_tcltk() {
|
||||
fi
|
||||
fi
|
||||
export PKG_CONFIG_PATH="${tcltk_libdir}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
return
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# FIXME: this function is a workaround for #1125
|
||||
|
Loading…
x
Reference in New Issue
Block a user