mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 12:30:08 -06:00
language_version works for python.
This commit is contained in:
@@ -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 .')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user