Update and rename plugins/python-build/bin/python-build to plugins/python-build/bin/find / -name tcl.h 2>/dev/null

Add conditional coding of `include` folder rather than hardcoded one.
This commit is contained in:
startergo 2023-10-15 07:35:57 -04:00 committed by GitHub
parent 56ec2fc1d1
commit cfae353db2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1645,7 +1645,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"
package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include/tcl-tk"
if [ -d "-I$tcltk_libdir/include/tcl-tk" ]; then
package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include/tcl-tk"
fi
package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include"
fi
export PKG_CONFIG_PATH="${tcltk_libdir}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
fi