language_version works for python.

This commit is contained in:
Anthony Sottile
2014-06-02 07:26:44 -07:00
parent a7ab9b2a28
commit 4b98b39cea
3 changed files with 5 additions and 2 deletions

View File

@@ -23,7 +23,10 @@ def install_environment(repo_cmd_runner, version='default'):
# Install a virtualenv
with clean_path_on_failure(repo_cmd_runner.path(ENVIRONMENT_DIR)):
repo_cmd_runner.run(['virtualenv', '{{prefix}}{0}'.format(ENVIRONMENT_DIR)])
venv_cmd = ['virtualenv', '{{prefix}}{0}'.format(ENVIRONMENT_DIR)]
if version != 'default':
venv_cmd.extend(['-p', version])
repo_cmd_runner.run(venv_cmd)
with in_env(repo_cmd_runner) as env:
env.run('cd {prefix} && pip install .')