@@ -41,25 +41,6 @@ if [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
4141 PYMONGO_BIN_DIR=$( cygpath -m " $PYMONGO_BIN_DIR " )
4242fi
4343
44- # If the toolchain is available, symlink binaries to the bin dir.
45- _bin_path=" "
46- if [ " Windows_NT" == " ${OS:- } " ]; then
47- _bin_path=" /cygdrive/c/Python/Current/Scripts"
48- elif [ " $( uname -s) " != " Darwin" ]; then
49- _bin_path=" /Library/Frameworks/Python.Framework/Versions/Current/bin"
50- else
51- _bin_path=" /opt/python/Current/bin"
52- fi
53- if [ -d " ${_bin_path} " ]; then
54- _suffix=" "
55- if [ " Windows_NT" == " ${OS:- } " ]; then
56- _suffix=" .exe"
57- fi
58- ln -s ${_bin_path} /just${_suffix} $PYMONGO_BIN_DIR /just${_suffix}
59- ln -s ${_bin_path} /uv${_suffix} $PYMONGO_BIN_DIR /uv${_suffix}
60- ln -s ${_bin_path} /uvx${_suffix} $PYMONGO_BIN_DIR /uvx${_suffix}
61- fi
62-
6344SCRIPT_DIR=" $PROJECT_DIRECTORY /.evergreen/scripts"
6445
6546if [ -f " $SCRIPT_DIR /env.sh" ]; then
9778rm -rf $DRIVERS_TOOLS
9879BRANCH=master
9980ORG=mongodb-labs
100- BRANCH=PYTHON-5203
101- ORG=blink1073
10281git clone --branch $BRANCH https://github.com/$ORG /drivers-evergreen-tools.git $DRIVERS_TOOLS
10382
10483cat << EOT > ${DRIVERS_TOOLS} /.env
@@ -113,3 +92,24 @@ cat <<EOT > expansion.yml
11392DRIVERS_TOOLS: "$DRIVERS_TOOLS "
11493PROJECT_DIRECTORY: "$PROJECT_DIRECTORY "
11594EOT
95+
96+ # If the toolchain is available, symlink binaries to the bin dir. This has to be done
97+ # after drivers-tools is cloned, since we might be using its binary dir.
98+ _bin_path=" "
99+ if [ " Windows_NT" == " ${OS:- } " ]; then
100+ _bin_path=" /cygdrive/c/Python/Current/Scripts"
101+ elif [ " $( uname -s) " != " Darwin" ]; then
102+ _bin_path=" /Library/Frameworks/Python.Framework/Versions/Current/bin"
103+ else
104+ _bin_path=" /opt/python/Current/bin"
105+ fi
106+ if [ -d " ${_bin_path} " ]; then
107+ _suffix=" "
108+ if [ " Windows_NT" == " ${OS:- } " ]; then
109+ _suffix=" .exe"
110+ fi
111+ mkdir -p $PYMONGO_BIN_DIR
112+ ln -s ${_bin_path} /just${_suffix} $PYMONGO_BIN_DIR /just${_suffix}
113+ ln -s ${_bin_path} /uv${_suffix} $PYMONGO_BIN_DIR /uv${_suffix}
114+ ln -s ${_bin_path} /uvx${_suffix} $PYMONGO_BIN_DIR /uvx${_suffix}
115+ fi
0 commit comments