diff options
| author | jaypipes@gmail.com <> | 2010-08-10 12:51:03 -0400 |
|---|---|---|
| committer | jaypipes@gmail.com <> | 2010-08-10 12:51:03 -0400 |
| commit | f5695429db27110d8a95df3b66e4045c59d88c6a (patch) | |
| tree | 999b1c29ae15ad5664aba4f8ea2229dcc46a1655 | |
| parent | 8c7558ed5ae7dd0b78a91a385dbd9b044ec7c8db (diff) | |
Quick fix on location of printouts when trying to install virtualenv.
| -rw-r--r-- | tools/install_venv.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/install_venv.py b/tools/install_venv.py index adf24b365..494535b5e 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -36,6 +36,7 @@ def die(message, *args): print >>sys.stderr, message % args sys.exit(1) + def run_command(cmd, redirect_output=True, error_ok=False): """Runs a command in an out-of-process shell, returning the output of that command @@ -51,9 +52,11 @@ def run_command(cmd, redirect_output=True, error_ok=False): die('Command "%s" failed.\n%s', ' '.join(cmd), output) return output + HAS_EASY_INSTALL = bool(run_command(['which', 'easy_install']).strip()) HAS_VIRTUALENV = bool(run_command(['which', 'virtualenv']).strip()) + def check_dependencies(): """Make sure virtualenv is in the path.""" @@ -62,8 +65,8 @@ def check_dependencies(): print 'not found.' # Try installing it via easy_install... if HAS_EASY_INSTALL: + print 'Installing virtualenv via easy_install...', if not run_command(['which', 'easy_install']): - print 'Installing virtualenv via easy_install...', die('ERROR: virtualenv not found.\n\nNova development requires virtualenv,' ' please install it using your favorite package management tool') print 'done.' |
