diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index cfd139dc..191c62d1 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1648,6 +1648,10 @@ use_homebrew_tcltk() { if [[ -z "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then local tcltk_version="$(sh -c '. '"$tcltk_libdir"'/lib/tclConfig.sh; echo $TCL_VERSION')" package_option python configure --with-tcltk-libs="-L$tcltk_libdir/lib -ltcl$tcltk_version -ltk$tcltk_version" + # In Homebrew Tcl/Tk 8.6.13, headers have been moved to the 'tcl-tk' subdir. + # We're not using tclConfig.sh here 'cuz it produces the version-specific path to /Cellar + # and we'd rather have rpath set to /opt/<...> to allow micro release upgrades without rebuilding + # XXX: do use tclConfig.h and translate the paths if more path shenanigans appear in later releases if [ -d "$tcltk_libdir/include/tcl-tk" ]; then package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include/tcl-tk" else