From 80b9d856009eaa85d4f888cd03300c127a198ff2 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sun, 27 Apr 2025 23:40:45 +0300 Subject: [PATCH] Adjust tests --- plugins/python-build/bin/python-build | 12 +- plugins/python-build/test/build.bats | 296 +++++++++++++------------- 2 files changed, 153 insertions(+), 155 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 09adb2f1..f1a50e82 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -867,7 +867,6 @@ build_package_standard_build() { else use_homebrew_zlib || true fi - use_homebrew || true fi if can_use_macports; then use_custom_tcltk || true @@ -878,6 +877,11 @@ build_package_standard_build() { else use_macports_zlib || true fi + fi + if can_use_homebrew; then + use_homebrew || true + fi + if can_use_macports; then use_macports || true fi @@ -1484,7 +1488,7 @@ prepend_ldflags_libs() { } use_homebrew() { - locked_in homebrew || return 1 + can_use_homebrew || return 1 # unless Homebrew is at the default /usr/local, need to add its paths to # compiler search to be able to use non-keg-only deps from there if command -v brew &>/dev/null; then @@ -1493,17 +1497,19 @@ use_homebrew() { if [[ -n $brew_prefix && $brew_prefix != "/usr" && $brew_prefix != "/usr/local" ]]; then export CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I${brew_prefix}/include" append_ldflags_libs "-L${brew_prefix}/lib -Wl,-rpath,${brew_prefix}/lib" + lock_in homebrew fi fi } use_macports() { - locked_in macports || return 1 + can_use_macports || return 1 local port_location="$(command -v port)" if [ -n "$port_location" ]; then local prefix="${port_location%/bin/port}" export CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }-I${prefix}/include" append_ldflags_libs "-L${prefix}/lib -Wl,-rpath,${prefix}/lib" + lock_in macports fi } diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index f1b29957..b6b4951b 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -70,9 +70,6 @@ assert_build_log() { install_fixture definitions/needs-yaml assert_success - unstub uname - unstub make - assert_build_log <