From 8445b0246e6d5b8c2c969c7c45d082752fd18e32 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 12 Oct 2024 06:07:44 -0500 Subject: [PATCH 1/2] test macos --- .evergreen/hatch.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.evergreen/hatch.sh b/.evergreen/hatch.sh index db0da2f4d0..b2f032a04c 100644 --- a/.evergreen/hatch.sh +++ b/.evergreen/hatch.sh @@ -18,17 +18,21 @@ if [ -n "$SKIP_HATCH" ]; then run_hatch() { bash ./.evergreen/run-tests.sh } -elif $PYTHON_BINARY -m hatch --version; then - run_hatch() { - $PYTHON_BINARY -m hatch run "$@" - } -else # No toolchain hatch present, set up virtualenv before installing hatch +else # Set up virtualenv before installing hatch # Use a random venv name because the encryption tasks run this script multiple times in the same run. ENV_NAME=hatchenv-$RANDOM createvirtualenv "$PYTHON_BINARY" $ENV_NAME # shellcheck disable=SC2064 trap "deactivate; rm -rf $ENV_NAME" EXIT HUP python -m pip install -q hatch + + # Ensure hatch does not write to user or global locations. + touch hatch_config.toml + export HATCH_CONFIG=$(pwd)/hatch_config.toml + hatch config restore + hatch config set dirs.data ".hatch/data" + hatch config set dirs.cache ".hatch/cache" + run_hatch() { python -m hatch run "$@" } From d619321a3ba92ad5c03f92dc7040dcda5c5023cf Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 14 Oct 2024 06:14:05 -0500 Subject: [PATCH 2/2] lint --- .evergreen/hatch.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.evergreen/hatch.sh b/.evergreen/hatch.sh index b2f032a04c..8f862c39d2 100644 --- a/.evergreen/hatch.sh +++ b/.evergreen/hatch.sh @@ -28,7 +28,8 @@ else # Set up virtualenv before installing hatch # Ensure hatch does not write to user or global locations. touch hatch_config.toml - export HATCH_CONFIG=$(pwd)/hatch_config.toml + HATCH_CONFIG=$(pwd)/hatch_config.toml + export HATCH_CONFIG hatch config restore hatch config set dirs.data ".hatch/data" hatch config set dirs.cache ".hatch/cache"