Skip to content

Commit b6d8423

Browse files
committed
Check and report missing modules when using --ec
1 parent b1c6a42 commit b6d8423

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

easybuild/scripts/findPythonDeps.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ def print_deps(package, verbose):
155155
if not can_run('eb', '--version'):
156156
print('EasyBuild not found or executable. Make sure it is in your $PATH when using --ec!')
157157
sys.exit(1)
158+
if args.verbose:
159+
print('Checking with EasyBuild for missing dependencies')
160+
missing_dep_out = run_cmd(['eb', args.ec, '--missing'], action_desc='Get missing dependencies')
161+
missing_deps = [dep for dep in missing_dep_out.split('\n') if dep.startswith('*') and '(%s)' % args.ec not in dep]
162+
if missing_deps:
163+
print('You need to install all modules on which %s depends first!' % args.ec)
164+
print('\n\t'.join(['Missing:'] + missing_deps))
165+
sys.exit(1)
166+
158167
with temporary_directory() as tmp_dir:
159168
old_dir = os.getcwd()
160169
os.chdir(tmp_dir)

0 commit comments

Comments
 (0)