Skip to content

Commit 46a52df

Browse files
committed
Switch to more reliable way of checking for direct dependencies.
1 parent 38da36b commit 46a52df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

easybuild/framework/easyblock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,8 +1451,8 @@ def make_module_extra(self, altroot=None, altversion=None):
14511451
for path in glob.glob(f'{self.installdir}/lib64/python*/site-packages')
14521452
if re.match(self.installdir + r'/lib64/python\d+\.\d+/site-packages', path)]
14531453

1454-
use_ebpythonprefixes = get_software_root('Python') and build_option('prefer_ebpythonprefixes') and \
1455-
self.cfg['prefer_ebpythonprefixes']
1454+
use_ebpythonprefixes = 'Python' in self.cfg.dependencies(runtime_only=True) and \
1455+
build_option('prefer_ebpythonprefixes') and self.cfg['prefer_ebpythonprefixes']
14561456

14571457
if len(python_paths) > 1 and not use_ebpythonprefixes:
14581458
raise EasyBuildError('Multiple python paths requires EBPYTHONPREFIXES: ' + ', '.join(python_paths))

0 commit comments

Comments
 (0)