Commit a1cba439 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

PKG: fix macx pkgsetup and python setup scripts

parent 58ba58b6
......@@ -28,7 +28,7 @@ cd "$DIRNAME_0" || exit 1
OUT_DIR=$(pwd)
#do not move below 3 lines. it must be before "unset LD_LIBRARY_PATH" code
sed -i "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/setup_python.sh"
sed -i "" "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/setup_python.sh"
chmod +x $OUT_DIR/setup_python.sh
./setup_python.sh
......@@ -62,13 +62,12 @@ done
#install uninstall_otb script
echo "Installing uninstall script for OTB 'uninstall_otb.sh'"
sed -i -E "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/install_manifest.txt"
sed -i -E "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/uninstall_otb.sh"
sed -i "" "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/install_manifest_otb.txt"
sed -i "" "s,mapla.sh,mapla.app -r,g" "$OUT_DIR/uninstall_otb.sh"
sed -i "" "s,monteverdi.sh,Monteverdi.app -r,g" "$OUT_DIR/uninstall_otb.sh"
sed -i "" "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/uninstall_otb.sh"
chmod +x "$OUT_DIR/uninstall_otb.sh"
rm -fr "Mapla.app"
rm -fr "Monteveridi.app"
cp -r "$OUT_DIR/template.app" "$OUT_DIR/Mapla.app"
cp -r "$OUT_DIR/template.app" "$OUT_DIR/Monteverdi.app"
......@@ -113,4 +112,4 @@ rm -f "$OUT_DIR/setup_python.sh"
rm -f "$OUT_DIR/Monteverdi.icns"
rm -f "$OUT_DIR/pkgsetup"
open "$OUT_DIR"
#open "$OUT_DIR"
......@@ -47,6 +47,10 @@ fi
python_INSTSONAME=$($OTB_PYTHON_EXE -c "import sys; from distutils import sysconfig; print (sysconfig.get_config_var('INSTSONAME'));")
python_lib_dirs="$LD_LIBRARY_PATH /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu"
if [ "$(uname)" = "Darwin" ]; then
python_lib_dirs="$DYLD_LIBRARY_PATH /usr/lib /Library/Frameworks /opt/local/lib /opt/local/Library/Frameworks"
fi;
found_python_lib="0"
python_lib_file_path=""
for list_of_dir in $python_lib_dirs
......@@ -59,7 +63,7 @@ do
done
if [ "$found_python_lib" -eq "1" ]; then
numpy_import_result="$($OTB_PYTHON_EXE -c 'import numpyx' 2>&1)"
numpy_import_result="$($OTB_PYTHON_EXE -c 'import numpy' 2>&1)"
if [ ! -z "$numpy_import_result" ]; then
printf %s\\n "*****Error occurred during installation******"
printf %s\\n "Python interpreter detected is : $OTB_PYTHON_EXE ( version: $python_version )"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment