From 6c233d503a00ff856e78b2773046b32a221325c0 Mon Sep 17 00:00:00 2001
From: Pete Peterson <petersonpf@ornl.gov>
Date: Fri, 10 Aug 2018 13:57:55 -0400
Subject: [PATCH] Add back location of executable

---
 .../Packaging/launch_mantidworkbench.sh.in     |  2 +-
 buildconfig/CMake/Packaging/mantidpython.in    | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/buildconfig/CMake/Packaging/launch_mantidworkbench.sh.in b/buildconfig/CMake/Packaging/launch_mantidworkbench.sh.in
index a2e55995f89..25a5d1354b6 100644
--- a/buildconfig/CMake/Packaging/launch_mantidworkbench.sh.in
+++ b/buildconfig/CMake/Packaging/launch_mantidworkbench.sh.in
@@ -15,7 +15,7 @@ INSTALLDIR=$(dirname $INSTALLDIR) # root install directory
 
 @VIRTUAL_GL_WRAPPER@
 
-# define where python libraries are
+# Define where python libraries are
 LOCAL_PYTHONPATH=@LOCAL_PYPATH@@PARAVIEW_PYTHON_PATHS@
 if [ -n "${PYTHONPATH}" ]; then
     LOCAL_PYTHONPATH=${LOCAL_PYTHONPATH}:${PYTHONPATH}
diff --git a/buildconfig/CMake/Packaging/mantidpython.in b/buildconfig/CMake/Packaging/mantidpython.in
index 21906335961..1b9df21e90c 100755
--- a/buildconfig/CMake/Packaging/mantidpython.in
+++ b/buildconfig/CMake/Packaging/mantidpython.in
@@ -5,8 +5,8 @@
 # Script is configured by CMake
 
 # Find out where we are
-SCRIPTFILE=$(readlink -f "$0")
-INSTALLDIR=$(dirname $SCRIPTFILE) # directory of executable
+THISFILE=$(readlink -f "$0")
+INSTALLDIR=$(dirname $THISFILE)   # directory of executable
 INSTALLDIR=$(dirname $INSTALLDIR) # root install directory
 
 @MTD_PATH_DEFINITION@
@@ -21,8 +21,8 @@ fi
 # Define paraview information
 PV_PLUGIN_PATH="${INSTALLDIR}/plugins/paraview/qt4"
 
-# Define extra libraries for python
-LOCAL_PYTHONPATH=@LOCAL_PYPATH@@PARAVIEW_PYTHON_PATHS@
+# Define where python libraries are
+LOCAL_PYTHONPATH=${INSTALLDIR}/bin:@LOCAL_PYPATH@@PARAVIEW_PYTHON_PATHS@
 if [ -n "${PYTHONPATH}" ]; then
     LOCAL_PYTHONPATH=${LOCAL_PYTHONPATH}:${PYTHONPATH}
 fi
@@ -40,7 +40,9 @@ else
 fi
 
 LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} \
-  TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD=${TCM_REPORT} \
-  PV_PLUGIN_PATH=${PV_PLUGIN_PATH} \
-  LD_LIBRARY_PATH=${LOCAL_LDPATH} PYTHONPATH=${LOCAL_PYTHONPATH} \
-  exec "$@"
+    TCMALLOC_LARGE_ALLOC_REPORT_THRESHOLD=${TCM_REPORT} \
+    PYTHONPATH=${LOCAL_PYTHONPATH} \
+    LD_LIBRARY_PATH=${LOCAL_LDPATH} \
+    PV_PLUGIN_PATH=${PV_PLUGIN_PATH} \
+    exec "$@"
+#
-- 
GitLab