reckless: detect pip3 or pip

This commit is contained in:
Alex Myers 2022-10-18 17:44:53 -05:00 committed by Christian Decker
parent 83dd431cdc
commit f18c5e320d
1 changed files with 7 additions and 3 deletions

View File

@ -350,10 +350,14 @@ def _install_plugin(src):
if checkout.returncode != 0:
print(f'failed to checkout referenced commit {src.commit}')
return False
# Install dependencies via requirements.txt
# Install dependencies via requirements.txt or pyproject.toml
mypip = 'pip3' if shutil.which('pip3') else 'pip'
if not shutil.which(mypip):
raise Exception(f'{mypip} not found in PATH')
install_methods = {
'requirements.txt': ['pip', 'install', '-r', 'requirements.txt'],
'pyproject.toml': ['pip', 'install', '-e', '.']
'requirements.txt': [mypip, 'install', '-r', 'requirements.txt'],
'pyproject.toml': [mypip, 'install', '-e', '.']
}
if src.deps is not None: