Ensure $GRAVITY_STATE_DIR is present in venv activate script any time

run.sh/common_startup.sh is called normally (without --skip-venv or
--no-create-venv).
This commit is contained in:
Nate Coraor
2022-02-16 10:09:50 -05:00
parent 821ce8570e
commit 0297eb1bc8
+1 -3
View File
@@ -122,7 +122,6 @@ if [ $SET_VENV -eq 1 ] && [ $CREATE_VENV -eq 1 ]; then
conda_activate
fi
virtualenv "$GALAXY_VIRTUAL_ENV"
setup_gravity_state_dir
else
# If $GALAXY_VIRTUAL_ENV does not exist, and there is no conda available, attempt to create it.
if [ -z "$GALAXY_PYTHON" ]; then
@@ -140,7 +139,6 @@ if [ $SET_VENV -eq 1 ] && [ $CREATE_VENV -eq 1 ]; then
echo "existing environment before starting Galaxy."
if command -v virtualenv >/dev/null; then
virtualenv -p "$GALAXY_PYTHON" "$GALAXY_VIRTUAL_ENV"
setup_gravity_state_dir
else
vvers=16.7.9
vurl="https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-${vvers}.tar.gz"
@@ -167,10 +165,10 @@ urlretrieve('$vurl', '$vsrc')"
tar zxf "$vsrc" -C "$vtmp"
"$GALAXY_PYTHON" "$vtmp/virtualenv-$vvers/virtualenv.py" "$GALAXY_VIRTUAL_ENV"
rm -rf "$vtmp"
setup_gravity_state_dir
fi
fi
fi
setup_gravity_state_dir
fi
# activate virtualenv or conda env, sets $GALAXY_VIRTUAL_ENV and $GALAXY_CONDA_ENV