mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-20 01:24:42 +04:00
Simplify installing into virtualenv
This commit is contained in:
parent
216b5c6ab1
commit
18249bec8a
3 changed files with 3 additions and 5 deletions
|
|
@ -45,9 +45,7 @@ def install_environment(repo_cmd_runner):
|
||||||
python_env.run('nodeenv --jobs 4 {{prefix}}{0}'.format(NODE_ENV))
|
python_env.run('nodeenv --jobs 4 {{prefix}}{0}'.format(NODE_ENV))
|
||||||
|
|
||||||
with in_env(repo_cmd_runner) as node_env:
|
with in_env(repo_cmd_runner) as node_env:
|
||||||
node_env.run(
|
node_env.run('cd {prefix} && npm install -g')
|
||||||
'cd {0} && npm install -g'.format(repo_cmd_runner.prefix_dir),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def run_hook(repo_cmd_runner, hook, file_args):
|
def run_hook(repo_cmd_runner, hook, file_args):
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ def install_environment(repo_cmd_runner):
|
||||||
# Install a virtualenv
|
# Install a virtualenv
|
||||||
repo_cmd_runner.run(['virtualenv', '{{prefix}}{0}'.format(PY_ENV)])
|
repo_cmd_runner.run(['virtualenv', '{{prefix}}{0}'.format(PY_ENV)])
|
||||||
with in_env(repo_cmd_runner) as env:
|
with in_env(repo_cmd_runner) as env:
|
||||||
env.run('cd {0} && pip install .'.format(repo_cmd_runner.prefix_dir))
|
env.run('cd {prefix} && pip install .')
|
||||||
|
|
||||||
|
|
||||||
def run_hook(repo_cmd_runner, hook, file_args):
|
def run_hook(repo_cmd_runner, hook, file_args):
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ def install_environment(repo_cmd_runner):
|
||||||
|
|
||||||
repo_cmd_runner.run(['__rvm-env.sh', '{{prefix}}{0}'.format(RVM_ENV)])
|
repo_cmd_runner.run(['__rvm-env.sh', '{{prefix}}{0}'.format(RVM_ENV)])
|
||||||
with in_env(repo_cmd_runner) as env:
|
with in_env(repo_cmd_runner) as env:
|
||||||
env.run('bundle install', cwd=repo_cmd_runner.prefix_dir)
|
env.run('cd {prefix} && bundle install')
|
||||||
|
|
||||||
|
|
||||||
def run_hook(repo_cmd_runner, hook, file_args):
|
def run_hook(repo_cmd_runner, hook, file_args):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue