core: make hpi install more defensive, just warn on no requirements
this is useful for backwards compatibility if modules remove their requirements
This commit is contained in:
parent
5c82d0faa9
commit
bb5ad2b6ac
1 changed files with 6 additions and 2 deletions
|
@ -344,8 +344,8 @@ def _requires(modules: Sequence[str]) -> Sequence[str]:
|
|||
|
||||
reqs = mod.requires
|
||||
if reqs is None:
|
||||
error(f"Module {mod.name} has no REQUIRES specification")
|
||||
sys.exit(1)
|
||||
warning(f"Module {mod.name} has no REQUIRES specification")
|
||||
continue
|
||||
for r in reqs:
|
||||
if r not in res:
|
||||
res.append(r)
|
||||
|
@ -369,6 +369,10 @@ def module_install(*, user: bool, module: Sequence[str], parallel: bool=False) -
|
|||
|
||||
requirements = _requires(module)
|
||||
|
||||
if len(requirements) == 0:
|
||||
warning('requirements list is empty, no need to install anything')
|
||||
return
|
||||
|
||||
pre_cmd = [
|
||||
sys.executable, '-m', 'pip',
|
||||
'install',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue