diff options
| author | Mark McLoughlin <markmc@redhat.com> | 2011-09-29 15:06:54 +0100 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2011-09-29 16:07:23 +0100 |
| commit | de5e6ea29efe02de42d95109e22bdd0039789f1b (patch) | |
| tree | a3fed41fe2eebd10ae1ba4d820005ee7eff9c93e | |
| parent | ef22c0054ccb846dd7e81ba35f7e9c2b533d5ff7 (diff) | |
| download | nova-de5e6ea29efe02de42d95109e22bdd0039789f1b.tar.gz nova-de5e6ea29efe02de42d95109e22bdd0039789f1b.tar.xz nova-de5e6ea29efe02de42d95109e22bdd0039789f1b.zip | |
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
| -rw-r--r-- | tools/install_venv.py | 13 |
1 files 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", |
