Skip to content

Commit a3b66b9

Browse files
committed
more cleanup
1 parent 1231138 commit a3b66b9

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

.evergreen/scripts/configure-env.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,7 @@ UV_CACHE_DIR=$PROJECT_DIRECTORY/.local/uv/cache
1919
DRIVERS_TOOLS_BINARIES="$DRIVERS_TOOLS/.bin"
2020
MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
2121

22-
# On Evergreen jobs, "CI" will be set, and we don't want to write to $HOME.
23-
if [ "${CI:-}" == "true" ]; then
24-
PYMONGO_BIN_DIR=${DRIVERS_TOOLS_BINARIES:-}
25-
# We want to use a path that's already on PATH on spawn hosts.
26-
else
27-
PYMONGO_BIN_DIR=$HOME/cli_bin
28-
fi
29-
30-
PATH_EXT="$MONGODB_BINARIES:$DRIVERS_TOOLS_BINARIES:$PYMONGO_BIN_DIR:\$PATH"
22+
PATH_EXT="$MONGODB_BINARIES:$DRIVERS_TOOLS_BINARIES:\$PATH"
3123

3224
# Python has cygwin path problems on Windows. Detect prospective mongo-orchestration home directory
3325
if [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
@@ -38,7 +30,6 @@ if [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
3830
UV_CACHE_DIR=$(cygpath -m "$UV_CACHE_DIR")
3931
DRIVERS_TOOLS_BINARIES=$(cygpath -m "$DRIVERS_TOOLS_BINARIES")
4032
MONGODB_BINARIES=$(cygpath -m "$MONGODB_BINARIES")
41-
PYMONGO_BIN_DIR=$(cygpath -m "$PYMONGO_BIN_DIR")
4233
fi
4334

4435
SCRIPT_DIR="$PROJECT_DIRECTORY/.evergreen/scripts"
@@ -65,7 +56,6 @@ export CARGO_HOME="$CARGO_HOME"
6556
export UV_TOOL_DIR="$UV_TOOL_DIR"
6657
export UV_CACHE_DIR="$UV_CACHE_DIR"
6758
export UV_TOOL_BIN_DIR="$DRIVERS_TOOLS_BINARIES"
68-
export PYMONGO_BIN_DIR="$PYMONGO_BIN_DIR"
6959
export PATH="$PATH_EXT"
7060
# shellcheck disable=SC2154
7161
export PROJECT="${project:-mongo-python-driver}"

.evergreen/scripts/install-dependencies.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ if [ -f $HERE/env.sh ]; then
1010
. $HERE/env.sh
1111
fi
1212

13-
_BIN_DIR=${PYMONGO_BIN_DIR:-$HOME/.local/bin}
13+
# On Evergreen jobs, "CI" will be set, and we don't want to write to $HOME.
14+
if [ "${CI:-}" == "true" ]; then
15+
_BIN_DIR=${DRIVERS_TOOLS_BINARIES:-}
16+
# We want to use a path that's already on PATH on spawn hosts.
17+
elif [ -d "$HOME/cli_bin" ]; then
18+
_BIN_DIR="$HOME/cli_bin"
19+
else
20+
_BIN_DIR="$HOME/.local/bin"
21+
fi
22+
1423
export PATH="$PATH:${_BIN_DIR}"
1524

1625
# Helper function to pip install a dependency using a temporary python env.

.evergreen/scripts/setup-dev-env.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ fi
2929
export UV_PYTHON=${PYTHON_BINARY}
3030
echo "Using python $UV_PYTHON"
3131

32-
# Add the default install path to the path if needed.
33-
if [ -z "${PYMONGO_BIN_DIR:-}" ]; then
34-
export PATH="$PATH:$HOME/.local/bin"
35-
fi
36-
3732
# Set up venv, making sure c extensions build unless disabled.
3833
if [ -z "${NO_EXT:-}" ]; then
3934
export PYMONGO_C_EXT_MUST_BUILD=1

0 commit comments

Comments
 (0)