File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 29
29
30
30
PATH_EXT=" $MONGODB_BINARIES :$DRIVERS_TOOLS_BINARIES :$PYMONGO_BIN_DIR :\$ PATH"
31
31
32
+ # If the toolchain is available, symlink binaries to the bin dir.
33
+ _bin_path=" "
34
+ if [ " Windows_NT" == " ${OS:- } " ]; then
35
+ _bin_path=" /cygdrive/c/Python/Current/Scripts"
36
+ elif [ " $( uname -s) " != " Darwin" ]; then
37
+ _bin_path=" /Library/Frameworks/Python.Framework/Versions/Current/bin"
38
+ else
39
+ _bin_path=" /opt/python/Current/bin"
40
+ fi
41
+ if [ -d " ${_bin_path} " ]; then
42
+ _suffix=" "
43
+ if [ " Windows_NT" == " ${OS:- } " ]; then
44
+ _suffix=" .exe"
45
+ fi
46
+ ln -s ${_bin_path} /just${_suffix} $PYMONGO_BIN_DIR /just
47
+ ln -s ${_bin_path} /uv${_suffix} $PYMONGO_BIN_DIR /uv
48
+ ln -s ${_bin_path} /uvx${_suffix} $PYMONGO_BIN_DIR /uvx
49
+ fi
50
+
32
51
# Python has cygwin path problems on Windows. Detect prospective mongo-orchestration home directory
33
52
if [ " Windows_NT" = " ${OS:- } " ]; then # Magic variable in cygwin
34
53
DRIVERS_TOOLS=$( cygpath -m $DRIVERS_TOOLS )
Original file line number Diff line number Diff line change @@ -24,10 +24,14 @@ function _pip_install() {
24
24
echo " Installing $2 using pip..."
25
25
createvirtualenv " $( find_python3) " $_VENV_PATH
26
26
python -m pip install $1
27
+ _suffix=" "
27
28
if [ " Windows_NT" = " ${OS:- } " ]; then
28
- ln -s " $( which $2 ) " $_BIN_DIR /$2 .exe
29
- else
30
- ln -s " $( which $2 ) " $_BIN_DIR /$2
29
+ _suffix=" .exe"
30
+ fi
31
+ ln -s " $( which $2 ) " $_BIN_DIR /${2}${_suffix}
32
+ # uv also comes with a uvx binary.
33
+ if [ $2 == " uv" ]; then
34
+ ln -s " $( which uvx) " $_BIN_DIR /uvx${_suffix}
31
35
fi
32
36
echo " Installed to ${_BIN_DIR} "
33
37
echo " Installing $2 using pip... done."
You can’t perform that action at this time.
0 commit comments