mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +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 .')
|
||||
|
||||
|
|
|
|||
1
setup.py
1
setup.py
|
|
@ -36,6 +36,7 @@ setup(
|
|||
'plumbum',
|
||||
'pyyaml',
|
||||
'simplejson',
|
||||
'virtualenv',
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ def test_run_a_python_hook(config_for_python_hooks_repo, store):
|
|||
assert ret[1] == "['/dev/null']\nHello World\n"
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.integration
|
||||
def test_run_versioned_hook(config_for_python3_hooks_repo, store):
|
||||
repo = Repository.create(config_for_python3_hooks_repo, store)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue