From 3b46dfb1f28e5b64209c6c267ffa93dc93238bfe Mon Sep 17 00:00:00 2001
From: Marcel Loose <loose@astron.nl>
Date: Tue, 25 Aug 2015 16:00:17 +0000
Subject: [PATCH] Task #8247: Need to apply the same logic to
 lofarinit.(c)sh.in to determine PYTHONPATH, because these scripts do not use
 the CMake variable PYTHON_INSTALL_DIR :(

---
 lofarinit.csh.in | 2 +-
 lofarinit.sh.in  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lofarinit.csh.in b/lofarinit.csh.in
index 602a12ecd8a..c9c6294da70 100644
--- a/lofarinit.csh.in
+++ b/lofarinit.csh.in
@@ -38,7 +38,7 @@ endif
 set lfr_libdir=`basename $lfr_libdir`
 
 # Get directory for Python extensions
-set lfr_pylibdir=`python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True, prefix='')"`
+set lfr_pylibdir=`python -c "from distutils.sysconfig import get_python_lib; from os.path import join; print join(get_python_lib(plat_specific=True, standard_lib=True, prefix=''), 'site-packages')"`
 
 # Only modify path variables if $lfr_root is an existing directory.
 if (! (-d $lfr_root) ) then
diff --git a/lofarinit.sh.in b/lofarinit.sh.in
index cadb08941e5..9f3b8f7c48f 100644
--- a/lofarinit.sh.in
+++ b/lofarinit.sh.in
@@ -38,7 +38,8 @@ fi
 lfr_libdir=`basename $lfr_libdir`
 
 # Get directory for Python extensions
-lfr_pylibdir=`python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True, prefix='')"`
+lfr_pylibdir=`python -c "from distutils.sysconfig import get_python_lib; from os.path import join; print join(get_python_lib(plat_specific=True, standard_lib=True, prefix=''), 'site-packages')"`
+
 
 # First strip the current LOFARROOT from PATH, LD_LIBRARY_PATH, and PYTHONPATH.
 # Take care that a possible . is preceeded by a backslash (for the later sed).
-- 
GitLab