From 2b4ab2a9ad82526e18e78d4e39667e7471f943f9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 2 May 2025 11:54:03 -0500 Subject: [PATCH] PYTHON-5365 Fix handing of remote tests (#2327) --- .evergreen/scripts/install-dependencies.sh | 14 ++++++-------- .evergreen/scripts/utils.py | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.evergreen/scripts/install-dependencies.sh b/.evergreen/scripts/install-dependencies.sh index ec389690c..5425d10c8 100755 --- a/.evergreen/scripts/install-dependencies.sh +++ b/.evergreen/scripts/install-dependencies.sh @@ -10,6 +10,12 @@ if [ -f $HERE/env.sh ]; then . $HERE/env.sh fi +# Set up the default bin directory. +if [ -z "${PYMONGO_BIN_DIR:-}" ]; then + PYMONGO_BIN_DIR="$HOME/.local/bin" + export PATH="$PYMONGO_BIN_DIR:$PATH" +fi + # Helper function to pip install a dependency using a temporary python env. function _pip_install() { _HERE=$(dirname ${BASH_SOURCE:-$0}) @@ -41,10 +47,6 @@ if ! command -v just &>/dev/null; then if [ "Windows_NT" = "${OS:-}" ]; then _TARGET="--target x86_64-pc-windows-msvc" fi - if [ -z "${PYMONGO_BIN_DIR:-}" ]; then - echo "Please install just!" - exit 1 - fi _BIN_DIR=$PYMONGO_BIN_DIR echo "Installing just..." mkdir -p "$_BIN_DIR" 2>/dev/null || true @@ -56,10 +58,6 @@ fi # Ensure uv is installed. if ! command -v uv &>/dev/null; then - if [ -z "${PYMONGO_BIN_DIR:-}" ]; then - echo "Please install uv!" - exit 1 - fi _BIN_DIR=$PYMONGO_BIN_DIR echo "Installing uv..." # On most systems we can install directly. diff --git a/.evergreen/scripts/utils.py b/.evergreen/scripts/utils.py index c9195b638..7a8f9640f 100644 --- a/.evergreen/scripts/utils.py +++ b/.evergreen/scripts/utils.py @@ -193,6 +193,6 @@ def run_command(cmd: str | list[str], **kwargs: Any) -> None: def create_archive() -> str: run_command("git add .", cwd=ROOT) - run_command('git commit -m "add files"', check=False, cwd=ROOT) + run_command('git commit --no-verify -m "add files"', check=False, cwd=ROOT) run_command(f"git archive -o {TMP_DRIVER_FILE} HEAD", cwd=ROOT) return TMP_DRIVER_FILE