Skip to content

Commit cf0bd4f

Browse files
committed
fix findPythonDeps when using a relative path as the --ec argument
1 parent dfe0102 commit cf0bd4f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

easybuild/scripts/findPythonDeps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,14 @@ def print_deps(package, verbose):
182182
print('\n\t'.join(['Missing:'] + missing_deps))
183183
sys.exit(1)
184184

185+
# If the --ec argument is a (relative) existing path make it absolute so we can find it after the chdir
186+
ec_arg = os.path.abspath(args.ec) if os.path.exists(args.ec) else args.ec
185187
with temporary_directory() as tmp_dir:
186188
old_dir = os.getcwd()
187189
os.chdir(tmp_dir)
188190
if args.verbose:
189191
print('Running EasyBuild to get build environment')
190-
run_cmd(['eb', args.ec, '--dump-env', '--force'], action_desc='Dump build environment')
192+
run_cmd(['eb', ec_arg, '--dump-env', '--force'], action_desc='Dump build environment')
191193
os.chdir(old_dir)
192194

193195
cmd = "source %s/*.env && python %s '%s'" % (tmp_dir, sys.argv[0], args.package)

0 commit comments

Comments
 (0)