mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
language_version works for python.
This commit is contained in:
parent
a7ab9b2a28
commit
4b98b39cea
3 changed files with 5 additions and 2 deletions
|
|
@ -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 .')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue