From 4d79575ed248b7c3a3bcc9bdddd1aa23d5df2bbf Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Fri, 11 Jul 2014 09:58:08 -0400 Subject: [PATCH] Automatically use a virtualenv in galaxy_root/.venv/ if it exists (a la Pulsar). --- .hgignore | 3 +++ run.sh | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/.hgignore b/.hgignore index cb4456fdbcf..83f2461dc6e 100644 --- a/.hgignore +++ b/.hgignore @@ -11,6 +11,9 @@ scripts/scramble/build scripts/scramble/lib scripts/scramble/archives +# Python virtualenv +.venv + # Database stuff database/beaker_sessions database/community_files diff --git a/run.sh b/run.sh index d344de7a235..787f98b535a 100755 --- a/run.sh +++ b/run.sh @@ -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`