diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 0e47c7f3..157833e6 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1888,20 +1888,34 @@ use_homebrew_tcltk() { 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 - 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.sh 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 - package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include" - fi + local tcltk_version="$(sh -c '. '"$tcltk_libdir"'/lib/tclConfig.sh; echo $TCL_VERSION')" + local tcltk_includes tcltk_libs + # 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.sh and translate the paths if more shenanigans appear in later releases + if [ -d "$tcltk_libdir/include/tcl-tk" ]; then + tcltk_includes="-I$tcltk_libdir/include/tcl-tk" + else + tcltk_includes="-I$tcltk_libdir/include" fi + tcltk_libs="-L$tcltk_libdir/lib -ltcl$tcltk_version -ltk$tcltk_version" + # Since 2.7.6, 3.3.3, 3.4.0 (Issue #1584): --with-tcltk-includes + --with-tcltk-libs Configure options + # Since 3.11.0 (bpo-45847): `pkg-config` call, TCLTK_CFLAGS + TCLTK_LIBS override + if [[ -n "$PYTHON_BUILD_TCLTK_USE_PKGCONFIG" ]]; then + # pkg-config is not present out of the box in MacOS. + # There's no way to provide a fallback only if it's is not present + # and Configure's logic of detecting if it's present is complicated. + # So we just override it always + export TCLTK_CFLAGS="$tcltk_includes" + export TCLTK_LIBS="$tcltk_libs" + else + package_option python configure --with-tcltk-includes="$tcltk_includes" + package_option python configure --with-tcltk-libs="$tcltk_libs" + fi + #set in either case as a failsafe export PKG_CONFIG_PATH="${tcltk_libdir}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" + lock_in homebrew return 0 fi diff --git a/plugins/python-build/share/python-build/3.12.0 b/plugins/python-build/share/python-build/3.12.0 index 605867fa..12ed1634 100644 --- a/plugins/python-build/share/python-build/3.12.0 +++ b/plugins/python-build/share/python-build/3.12.0 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.1.2" "https://www.openssl.org/source/openssl-3.1.2.tar.gz#a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.1 b/plugins/python-build/share/python-build/3.12.1 index 636724c9..907bfaf3 100644 --- a/plugins/python-build/share/python-build/3.12.1 +++ b/plugins/python-build/share/python-build/3.12.1 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.1.2" "https://www.openssl.org/source/openssl-3.1.2.tar.gz#a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.10 b/plugins/python-build/share/python-build/3.12.10 index 75258a1d..00ed1e90 100644 --- a/plugins/python-build/share/python-build/3.12.10 +++ b/plugins/python-build/share/python-build/3.12.10 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.3" "https://github.com/openssl/openssl/releases/download/openssl-3.3.3/openssl-3.3.3.tar.gz#712590fd20aaa60ec75d778fe5b810d6b829ca7fb1e530577917a131f9105539" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.11 b/plugins/python-build/share/python-build/3.12.11 index 85bd7d10..ee1c2668 100644 --- a/plugins/python-build/share/python-build/3.12.11 +++ b/plugins/python-build/share/python-build/3.12.11 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.2 b/plugins/python-build/share/python-build/3.12.2 index cee4c606..cd7fbe7e 100644 --- a/plugins/python-build/share/python-build/3.12.2 +++ b/plugins/python-build/share/python-build/3.12.2 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.2.1" "https://www.openssl.org/source/openssl-3.2.1.tar.gz#83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.3 b/plugins/python-build/share/python-build/3.12.3 index 2228238d..484d8b4d 100644 --- a/plugins/python-build/share/python-build/3.12.3 +++ b/plugins/python-build/share/python-build/3.12.3 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.2.1" "https://www.openssl.org/source/openssl-3.2.1.tar.gz#83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.4 b/plugins/python-build/share/python-build/3.12.4 index b4016372..def8ffb2 100644 --- a/plugins/python-build/share/python-build/3.12.4 +++ b/plugins/python-build/share/python-build/3.12.4 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.2.2" "https://www.openssl.org/source/openssl-3.2.2.tar.gz#197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.5 b/plugins/python-build/share/python-build/3.12.5 index d067a27e..4bc86ad7 100644 --- a/plugins/python-build/share/python-build/3.12.5 +++ b/plugins/python-build/share/python-build/3.12.5 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.1" "https://www.openssl.org/source/openssl-3.3.1.tar.gz#777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.6 b/plugins/python-build/share/python-build/3.12.6 index 73e2f6eb..28742012 100644 --- a/plugins/python-build/share/python-build/3.12.6 +++ b/plugins/python-build/share/python-build/3.12.6 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.7 b/plugins/python-build/share/python-build/3.12.7 index 00a35778..49d5e7db 100644 --- a/plugins/python-build/share/python-build/3.12.7 +++ b/plugins/python-build/share/python-build/3.12.7 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.8 b/plugins/python-build/share/python-build/3.12.8 index 005117f6..42634f1a 100644 --- a/plugins/python-build/share/python-build/3.12.8 +++ b/plugins/python-build/share/python-build/3.12.8 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.12.9 b/plugins/python-build/share/python-build/3.12.9 index 58c77022..c03fe919 100644 --- a/plugins/python-build/share/python-build/3.12.9 +++ b/plugins/python-build/share/python-build/3.12.9 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13-dev b/plugins/python-build/share/python-build/3.13-dev index 3fa7508a..4beb508f 100644 --- a/plugins/python-build/share/python-build/3.13-dev +++ b/plugins/python-build/share/python-build/3.13-dev @@ -1,6 +1,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1 install_package "openssl-3.5.1" "https://www.openssl.org/source/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline diff --git a/plugins/python-build/share/python-build/3.13.0 b/plugins/python-build/share/python-build/3.13.0 index 4f73ad83..e79fafa7 100644 --- a/plugins/python-build/share/python-build/3.13.0 +++ b/plugins/python-build/share/python-build/3.13.0 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.3.2" "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz#2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.1 b/plugins/python-build/share/python-build/3.13.1 index cfeff70f..a002addc 100644 --- a/plugins/python-build/share/python-build/3.13.1 +++ b/plugins/python-build/share/python-build/3.13.1 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.0" "https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz#e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.2 b/plugins/python-build/share/python-build/3.13.2 index 1df925ce..9d8d205f 100644 --- a/plugins/python-build/share/python-build/3.13.2 +++ b/plugins/python-build/share/python-build/3.13.2 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.0" "https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz#e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.3 b/plugins/python-build/share/python-build/3.13.3 index 32f5c79a..d37c1ff1 100644 --- a/plugins/python-build/share/python-build/3.13.3 +++ b/plugins/python-build/share/python-build/3.13.3 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.1" "https://github.com/openssl/openssl/releases/download/openssl-3.4.1/openssl-3.4.1.tar.gz#002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.4 b/plugins/python-build/share/python-build/3.13.4 index f07d8f32..58aecf3c 100644 --- a/plugins/python-build/share/python-build/3.13.4 +++ b/plugins/python-build/share/python-build/3.13.4 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.4.1" "https://github.com/openssl/openssl/releases/download/openssl-3.4.1/openssl-3.4.1.tar.gz#002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.5 b/plugins/python-build/share/python-build/3.13.5 index d867c4eb..1eba07fc 100644 --- a/plugins/python-build/share/python-build/3.13.5 +++ b/plugins/python-build/share/python-build/3.13.5 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.6 b/plugins/python-build/share/python-build/3.13.6 index f474fcb4..40cfe8b4 100644 --- a/plugins/python-build/share/python-build/3.13.6 +++ b/plugins/python-build/share/python-build/3.13.6 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.13.7 b/plugins/python-build/share/python-build/3.13.7 index 8d9b3c1f..710ed2d2 100644 --- a/plugins/python-build/share/python-build/3.13.7 +++ b/plugins/python-build/share/python-build/3.13.7 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.2" "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz#c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec" mac_openssl --if has_broken_mac_openssl install_package "readline-8.3" "https://mirror.cs.odu.edu/gnu/readline/readline-8.3.tar.gz#fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.14-dev b/plugins/python-build/share/python-build/3.14-dev index 8823e939..6fbd8403 100644 --- a/plugins/python-build/share/python-build/3.14-dev +++ b/plugins/python-build/share/python-build/3.14-dev @@ -1,6 +1,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1 install_package "openssl-3.5.1" "https://www.openssl.org/source/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline diff --git a/plugins/python-build/share/python-build/3.14.0rc3 b/plugins/python-build/share/python-build/3.14.0rc3 index a7f779a8..d7239f38 100644 --- a/plugins/python-build/share/python-build/3.14.0rc3 +++ b/plugins/python-build/share/python-build/3.14.0rc3 @@ -1,5 +1,6 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline if has_tar_xz_support; then diff --git a/plugins/python-build/share/python-build/3.15-dev b/plugins/python-build/share/python-build/3.15-dev index ce92a386..d9681694 100644 --- a/plugins/python-build/share/python-build/3.15-dev +++ b/plugins/python-build/share/python-build/3.15-dev @@ -1,6 +1,7 @@ prefer_openssl3 export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1 export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 +export PYTHON_BUILD_TCLTK_USE_PKGCONFIG=1 export PYTHON_BUILD_CONFIGURE_WITH_DSYMUTIL=1 install_package "openssl-3.5.1" "https://github.com/openssl/openssl/releases/download/openssl-3.5.1/openssl-3.5.1.tar.gz#529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f" mac_openssl --if has_broken_mac_openssl install_package "readline-8.2" "https://ftpmirror.gnu.org/readline/readline-8.2.tar.gz#3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" mac_readline --if has_broken_mac_readline diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 300dbd7d..e87e1569 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -29,14 +29,24 @@ cached_tarball() { tarball() { local name="$1" + shift local path="$PWD/$name" - local configure="$path/${2:-configure}" - shift 1 + local configure="$1" + if [[ ${configure:0:1} == "-" ]]; then configure=""; fi + configure="$path/${configure:-configure}" + shift || true + local extra_vars var_name + if [[ $# -gt 0 ]]; then + for var_name in "$@"; do + extra_vars="${extra_vars:+$extra_vars }$var_name=\$$var_name" + done + fi executable "$configure" <> build.log -echo "$name: \$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log +echo "$name:" "\$@" \${PYTHONOPT:+PYTHONOPT=\$PYTHONOPT} >> build.log +${extra_vars:+echo \"$name: $extra_vars\" >>build.log} OUT for file; do @@ -751,7 +761,7 @@ make install OUT } -@test "tcl-tk is linked from Homebrew" { +@test "tcl-tk is linked from Homebrew via --with-tcl-*" { cached_tarball "Python-3.6.2" tcl_tk_version=8.6 tcl_tk_libdir="$BATS_TEST_TMPDIR/homebrew-tcl-tk" @@ -778,7 +788,42 @@ DEF assert_build_log <>"$tcl_tk_libdir/lib/tclConfig.sh" + + stub uname '-s : echo Darwin' + stub sw_vers '-productVersion : echo 1010' + + stub brew "--prefix tcl-tk@8 : echo '$tcl_tk_libdir'" + for i in {1..4}; do stub brew false; done + + stub_make_install + + run_inline_definition <