From 530fdef738448fc26e399109562bf73f5f498af4 Mon Sep 17 00:00:00 2001 From: Per Larsen Date: Thu, 30 Nov 2023 03:36:23 -0800 Subject: [PATCH] CI: Fix macOS provisioning of python packages Plus a few other assorted adjustmentst --- azure-pipelines.yml | 3 +++ scripts/provision_mac.sh | 15 +++------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a04810e599..3fd7173bbb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -102,7 +102,10 @@ jobs: export HOMEBREW_NO_AUTO_UPDATE=1 # prepare environment for the following steps source $HOME/.cargo/env + # print some useful info to help troubleshoot brew info llvm + which python3 + /usr/bin/env python3 -c "import sys; print(sys.path)" displayName: 'Provision macOS' - script: | diff --git a/scripts/provision_mac.sh b/scripts/provision_mac.sh index 9723532bad..10b3298bc1 100755 --- a/scripts/provision_mac.sh +++ b/scripts/provision_mac.sh @@ -1,7 +1,5 @@ #!/bin/bash -set -e - # complain if we're not on macOS UNAME=$(uname -s) if [ "$UNAME" != "Darwin" ]; then @@ -22,18 +20,11 @@ export HOMEBREW_NO_AUTO_UPDATE=1 # NOTE: Pin LLVM to a known good version since new releases # tend not to be backwards compatible # `bash` needed b/c macOS ships with bash 3, which doesn't support arrays properly -hb_packages=(python cmake ninja gpg llvm bash) -for item in "${hb_packages[@]}"; do - brew info "${item}" | grep 'Not installed' > /dev/null && brew install "${item}" -done - -type -P "pip3" >/dev/null || { - echo >&2 "pip3 not in path."; exit 1; -} +brew install -q python cmake ninja gpg llvm@17 bash # Python 3 packages -pip3 install --user --upgrade pip -pip3 install -r "$SCRIPT_DIR/requirements.txt" --user --disable-pip-version-check +python3 -m pip install --user --upgrade pip +python3 -m pip install --user -r "$SCRIPT_DIR/requirements.txt" # Rust and dependencies RUST_TOOLCHAIN_FILE="$SCRIPT_DIR/../rust-toolchain.toml"