aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPjotr Prins2018-03-19 13:06:13 +0000
committerPjotr Prins2018-03-19 13:06:13 +0000
commitcfb3ff04e921cda320d46bf4eaabf1610019e1c7 (patch)
tree54d1a272ab9ef8de994d4c1f5e197110105176ec /bin
parentb359cb0712e9ef923d35524f310d841581d48f30 (diff)
downloadgenenetwork2-cfb3ff04e921cda320d46bf4eaabf1610019e1c7.tar.gz
- Disabled PYTHONPATH injection - fix Guix instead, see https://github.com/pjotrp/genenetwork2/commit/63a5c8a42ad02e9126bb207465ff5eca98f6515d
- Renamed WQFLASK_SETTINGS to GN2_SETTINGS
Diffstat (limited to 'bin')
-rwxr-xr-xbin/genenetwork233
1 files changed, 15 insertions, 18 deletions
diff --git a/bin/genenetwork2 b/bin/genenetwork2
index 2a83a1cd..b9e0a02b 100755
--- a/bin/genenetwork2
+++ b/bin/genenetwork2
@@ -68,32 +68,29 @@ if [ "$1" = "-c" -o "$1" = "-gunicorn" ]; then
echo "Can not use $1 switch without default settings file"
exit 1
fi
-# Handle settings parameter (can be .py or .json)
-if [ ! -z $1 ]; then
- settings=$(realpath "$1")
- if [ ! -e $settings ]; then
- settings=$GN2_BASE_DIR/etc/default_settings.py
- else
- shift
- fi
-fi
-ext="${settings##*.}"
-if [ "$ext" = "json" -o "$ext" = "JSON" ]; then
- overrides=$settings
+settings=$1
+if [ -z $settings ]; then
+ settings=$GN2_BASE_DIR/etc/default_settings.py
else
- echo $settings
+ shift
fi
+settings=$(realpath $settings)
+
+# ext="${settings##*.}"
+# if [ "$ext" = "json" -o "$ext" = "JSON" ]; then
+# overrides=$settings
+# else
+# echo $settings
+# fi
if [ ! -e $settings ]; then
echo "ERROR: can not locate settings file - pass it in the command line"
exit 1
fi
-export WQFLASK_SETTINGS=$settings # Python
-export WQFLASK_OVERRIDES=$overrides # JSON
-echo WQFLASK_SETTINGS=$settings
-echo WQFLASK_OVERRIDES=$overrides
+export GN2_SETTINGS=$settings # Python
+echo GN2_SETTINGS=$settings
# This is a temporary hack to inject ES - should have added python2-elasticsearch package to guix instead
# if [ -z $ELASTICSEARCH_PROFILE ]; then
@@ -115,7 +112,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${PYTHONPATH:+:}$PYTHONPATH"
+ export PYTHONPATH="$GN2_PROFILE/lib/python2.7/site-packages" # never inject another 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