From de5e6ea29efe02de42d95109e22bdd0039789f1b Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 29 Sep 2011 15:06:54 +0100 Subject: install_venv: refactor out pip_install helper We don't need to pass the -E argument since we're already running inside the virtualenv. Change-Id: Idd77b9bdc067e2288d0fa694a2bb6769675065cf --- tools/install_venv.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/install_venv.py b/tools/install_venv.py index 3c2f6979f..19bf04da5 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -97,14 +97,19 @@ def create_virtualenv(venv=VENV): print 'done.' +def pip_install(*args): + run_command(['tools/with_venv.sh', 'pip', 'install'] + list(args), + redirect_output=False) + + 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, - 'greenlet'], redirect_output=False) - run_command(['tools/with_venv.sh', 'pip', 'install', '-E', venv, '-r', - PIP_REQUIRES], redirect_output=False) + pip_install('greenlet') + + pip_install('-r', PIP_REQUIRES) # Tell the virtual env how to "import nova" pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages", -- cgit