Automatically use a virtualenv in galaxy_root/.venv/ if it exists (a la Pulsar).

This commit is contained in:
Nate Coraor
2014-07-11 09:58:08 -04:00
parent 7f91e8e5c5
commit 4d79575ed2
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -11,6 +11,9 @@ scripts/scramble/build
scripts/scramble/lib
scripts/scramble/archives
# Python virtualenv
.venv
# Database stuff
database/beaker_sessions
database/community_files
+7
View File
@@ -11,6 +11,13 @@ if [ -n "$GALAXY_UNIVERSE_CONFIG_DIR" ]; then
python ./scripts/build_universe_config.py "$GALAXY_UNIVERSE_CONFIG_DIR"
fi
# If there is a .venv/ directory, assume it contains a virtualenv that we
# should run this instance in.
if [ -d .venv ];
then
. .venv/bin/activate
fi
if [ -n "$GALAXY_RUN_ALL" ]; then
servers=`sed -n 's/^\[server:\(.*\)\]/\1/ p' universe_wsgi.ini | xargs echo`
daemon=`echo "$@" | grep -q daemon`