mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 18:11:48 +04:00
adding pip dependancies support for conda language
This commit is contained in:
parent
5840635baa
commit
8555cd19f5
1 changed files with 21 additions and 4 deletions
|
|
@ -77,8 +77,25 @@ def install_environment(
|
|||
'environment.yml', cwd=prefix.prefix_dir,
|
||||
)
|
||||
if additional_dependencies:
|
||||
conda_dependancies = [
|
||||
conda_dep.split()[-1]
|
||||
for conda_dep in additional_dependencies
|
||||
if not conda_dep.startswith('pip install')
|
||||
]
|
||||
pip_dependancies = [
|
||||
pip_dep.split()[-1]
|
||||
for pip_dep in additional_dependencies
|
||||
if pip_dep.startswith('pip install')
|
||||
]
|
||||
if conda_dependancies:
|
||||
cmd_output_b(
|
||||
conda_exe, 'install', '-p', env_dir, *additional_dependencies,
|
||||
conda_exe, 'install', '-p', env_dir, *conda_dependancies,
|
||||
cwd=prefix.prefix_dir,
|
||||
)
|
||||
if pip_dependancies:
|
||||
cmd_output_b(
|
||||
conda_exe, 'run', '-p', 'pip',
|
||||
'--yes', env_dir, *pip_dependancies,
|
||||
cwd=prefix.prefix_dir,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue