diff --git a/tools/install_venv.py b/tools/install_venv.py old mode 100644 new mode 100755 index ff644d5346..b05a3f8748 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 @@ -102,10 +103,10 @@ def install_dependencies(venv=VENV): print 'Installing dependencies with pip (this can take a while)...' # Install greenlet by hand - just listing it in the requires file does not # get it in stalled in the right order - run_command(['tools/with_venv.sh', 'pip', 'install', '-E', venv, + run_command(['tools/with_venv.sh', '-E', venv, 'pip', 'install', 'greenlet'], redirect_output=False) for requires in (PIP_REQUIRES, TEST_REQUIRES): - run_command(['tools/with_venv.sh', 'pip', 'install', '-E', venv, '-r', + run_command(['tools/with_venv.sh', '-E', venv, 'pip', 'install', '-r', requires], redirect_output=False) # Tell the virtual env how to "import reddwarf" diff --git a/tools/with_venv.sh b/tools/with_venv.sh index c8d2940fc7..633806f45d 100755 --- a/tools/with_venv.sh +++ b/tools/with_venv.sh @@ -1,4 +1,30 @@ #!/bin/bash -TOOLS=`dirname $0` -VENV=$TOOLS/../.venv -source $VENV/bin/activate && $@ + +set -e + +me=${0##*/} +dir="$(dirname $0)" + +function print_usage() { + cat >&2 <