about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2018-01-19 10:36:19 +0300
committerMuriithi Frederick Muriuki2018-01-19 10:36:19 +0300
commit63a5c8a42ad02e9126bb207465ff5eca98f6515d (patch)
tree5e203e40c6edb5cf22213e79325f753aeeca780c
parent7004c0ee5e86bfb7ebe491356ca3210d2dc2b67b (diff)
downloadgenenetwork2-63a5c8a42ad02e9126bb207465ff5eca98f6515d.tar.gz
Add elasticsearch module to the path
* Add some code to set up the path for the python-elasticsearch module.
-rwxr-xr-xbin/genenetwork27
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index a7edb1c2..ccd9b1d9 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -61,6 +61,11 @@ export WQFLASK_OVERRIDES=$overrides   # JSON
 echo WQFLASK_SETTINGS=$settings
 echo WQFLASK_OVERRIDES=$overrides
 
+if [ -z $ELASTICSEARCH_PROFILE ]; then
+    echo -e "\033[1;33mWARNING: Elastic Search profile has not been set - use ELASTICSEARCH_PROFILE\033[0m";
+else
+    PYTHONPATH="$PYTHONPATH${PYTHONPATH:+:}$ELASTICSEARCH_PROFILE/lib/python2.7/site-packages"
+fi
 if [ -z $GN2_PROFILE ] ; then
     echo "WARNING: GN2_PROFILE has not been set - you need the environment, so I hope you know what you are doing!"
     export GN2_PROFILE=$(dirname $(dirname $(which genenetwork2)))
@@ -72,7 +77,7 @@ if [ -z $GN2_PROFILE ]; then
     read -p "PRESS [ENTER] TO CONTINUE..."
 else
     export PATH=$GN2_PROFILE/bin:$PATH
-    export PYTHONPATH=$GN2_PROFILE/lib/python2.7/site-packages
+    export PYTHONPATH="$GN2_PROFILE/lib/python2.7/site-packages${PYTHONPATH:+:}$PYTHONPATH"
     export R_LIBS_SITE=$GN2_PROFILE/site-library
     export GEM_PATH=$GN2_PROFILE/lib/ruby/gems/2.4.0
     export JS_GUIX_PATH=$GN2_PROFILE/share/genenetwork2/javascript