From aa07a3a37c83a10ab2653ad73c7ae18d60546054 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Sat, 17 Sep 2022 04:54:04 +0300 Subject: [PATCH] Remove extraneous is_mac call --- plugins/python-build/bin/python-build | 2 +- plugins/python-build/test/build.bats | 16 ++++++++-------- plugins/python-build/test/compiler.bats | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 1b5c30aa..5ae819cb 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -1330,7 +1330,7 @@ use_homebrew() { 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 is_mac && command -v brew &>/dev/null; then + if command -v brew &>/dev/null; then local brew_prefix="$(brew --prefix 2>/dev/null || true)" # /usr/local/lib:/usr/lib is the default library search path if [[ -n $brew_prefix && $brew_prefix != "/usr" && $brew_prefix != "/usr/local" ]]; then diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 5e757161..e770a690 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -151,7 +151,7 @@ OUT BREW_PREFIX="$TMP/homebrew-prefix" mkdir -p "$BREW_PREFIX" - for i in {1..9}; do stub uname '-s : echo Darwin'; done + for i in {1..8}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done stub brew "--prefix : echo '$BREW_PREFIX'" false stub_make_install @@ -179,7 +179,7 @@ OUT brew_libdir="$TMP/homebrew-yaml" mkdir -p "$brew_libdir" - for i in {1..10}; do stub uname '-s : echo Darwin'; done + for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done stub brew "--prefix libyaml : echo '$brew_libdir'" for i in {1..4}; do stub brew false; done @@ -234,7 +234,7 @@ OUT readline_libdir="$TMP/homebrew-readline" mkdir -p "$readline_libdir" - for i in {1..8}; do stub uname '-s : echo Darwin'; done + for i in {1..7}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..2}; do stub brew false; done stub brew "--prefix readline : echo '$readline_libdir'" @@ -317,7 +317,7 @@ OUT mkdir -p "$readline_libdir/include/readline" touch "$readline_libdir/include/readline/rlconf.h" - for i in {1..8}; do stub uname '-s : echo Darwin'; done + for i in {1..7}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..3}; do stub brew false; done @@ -349,7 +349,7 @@ OUT mkdir -p "$tcl_tk_libdir/lib" echo "TCL_VERSION='$tcl_tk_version'" >>"$tcl_tk_libdir/lib/tclConfig.sh" - for i in {1..10}; do stub uname '-s : echo Darwin'; done + for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done stub brew false @@ -383,7 +383,7 @@ OUT tcl_tk_version_long="8.6.10" tcl_tk_version="${tcl_tk_version_long%.*}" - for i in {1..9}; do stub uname '-s : echo Darwin'; done + for i in {1..8}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 1010'; done for i in {1..4}; do stub brew false; done @@ -411,7 +411,7 @@ OUT @test "number of CPU cores defaults to 2" { cached_tarball "Python-3.6.2" - for i in {1..10}; do stub uname '-s : echo Darwin'; done + for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done stub sysctl false @@ -438,7 +438,7 @@ OUT @test "number of CPU cores is detected on Mac" { cached_tarball "Python-3.6.2" - for i in {1..10}; do stub uname '-s : echo Darwin'; done + for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..2}; do stub sw_vers '-productVersion : echo 10.10'; done stub sysctl '-n hw.ncpu : echo 4' diff --git a/plugins/python-build/test/compiler.bats b/plugins/python-build/test/compiler.bats index 96c30423..867aa88b 100644 --- a/plugins/python-build/test/compiler.bats +++ b/plugins/python-build/test/compiler.bats @@ -63,7 +63,7 @@ DEF mkdir -p "$INSTALL_ROOT" cd "$INSTALL_ROOT" - for i in {1..10}; do stub uname '-s : echo Darwin'; done + for i in {1..9}; do stub uname '-s : echo Darwin'; done for i in {1..3}; do stub sw_vers '-productVersion : echo 10.10'; done stub cc 'false'