File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -99,25 +99,32 @@ uv venv venv &>/dev/null
99
99
popd > /dev/null # $SCRIPT_DIR
100
100
pushd " $TARGET_DIR " > /dev/null
101
101
102
- # Add support for MongoDB 3.6, which was dropped in pymongo 4.11.
103
- EXTRA_ARGS=" "
104
- if [ " ${MONGODB_VERSION:- latest} " == " 3.6" ]; then
105
- EXTRA_ARGS_ARR=(--with " pymongo<4.11" )
106
- EXTRA_ARGS=" ${EXTRA_ARGS_ARR[*]} "
107
- fi
102
+ declare uv_install_args
103
+ uv_install_args=(
104
+ --quiet
105
+ --force
106
+ --editable
107
+ --with certifi
108
+ )
109
+
110
+ # Preserve pymongo compatibility with the requested server version.
111
+ case " ${MONGODB_VERSION:- " latest" } " in
112
+ 3.6) uv_install_args+=(--with " pymongo<4.11" ) ;;
113
+ 4.0) uv_install_args+=(--with " pymongo<4.14" ) ;;
114
+ esac
108
115
109
116
# On Windows, we have to do a bit of path manipulation.
110
117
if [ " Windows_NT" == " ${OS:- } " ]; then
111
118
TMP_DIR=$( cygpath -m " $( mktemp -d) " )
112
119
PATH=" $SCRIPT_DIR /venv/Scripts:$PATH "
113
- UV_TOOL_BIN_DIR=${TMP_DIR} uv tool install -q ${EXTRA_ARGS} --with certifi --force --editable .
120
+ UV_TOOL_BIN_DIR=${TMP_DIR} uv tool install " ${uv_install_args[@] :? } " .
114
121
filenames=$( ls ${TMP_DIR} )
115
122
for filename in $filenames ; do
116
123
mv $TMP_DIR /$filename " $1 /${filename// .exe/ } "
117
124
done
118
125
rm -rf $TMP_DIR
119
126
else
120
- UV_TOOL_BIN_DIR=$( pwd) uv tool install -q ${EXTRA_ARGS} --with certifi --force --editable .
127
+ UV_TOOL_BIN_DIR=$( pwd) uv tool install " ${uv_install_args[@] :? } " .
121
128
fi
122
129
123
130
popd > /dev/null # "$TARGET_DIR"
You can’t perform that action at this time.
0 commit comments