Skip to content

Commit 4d64bc5

Browse files
test
1 parent 83f4fa5 commit 4d64bc5

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

admin/install_mule.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ echo "[INFO] Installing against Python $PYTHONVER"
140140

141141
# Setup a temporary directory where the install will be initially created
142142
SCRATCHDIR=$(mktemp -d)
143-
SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages
143+
pkg_loc=$($mule_python_exec -c "import site ; print(site.getsitepackages()[0])")
144+
if [[ $pkg_loc == *"site-packages"* ]]; then
145+
SCRATCHLIB=$SCRATCHDIR/lib/$PYTHONEXEC/site-packages
146+
else
147+
SCRATCHLIB=$SCRATCHDIR/loc/lib/$PYTHONEXEC/dist-packages
148+
fi
144149

145150
# Make relative paths absolute
146151
if [ ! ${LIB_DEST:0:1} == "/" ] ; then
@@ -341,8 +346,8 @@ function install(){
341346
cd $wc_root/$module
342347

343348
echo "[INFO] Installing $module module to $SCRATCHDIR"
344-
$mule_python_exec -m pip install . --prefix $SCRATCHDIR
345-
# $mule_python_exec setup.py install --prefix $SCRATCHDIR
349+
# $mule_python_exec -m pip install . --prefix $SCRATCHDIR
350+
$mule_python_exec setup.py install --prefix $SCRATCHDIR
346351
}
347352

348353
for module in $MODULE_LIST ; do

0 commit comments

Comments
 (0)