Skip to content

Commit 11cffaa

Browse files
committed
Add all the found python paths even when using PYTHONPATH
1 parent d281fc8 commit 11cffaa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

easybuild/framework/easyblock.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,8 +1460,10 @@ def make_module_extra(self, altroot=None, altversion=None):
14601460
if use_ebpythonprefixes:
14611461
if '' not in self.module_generator.added_paths_per_key['EBPYTHONPREFIXES']:
14621462
lines.append(self.module_generator.prepend_paths('EBPYTHONPREFIXES', ''))
1463-
elif python_paths[0] not in self.module_generator.added_paths_per_key['PYTHONPATH']:
1464-
lines.append(self.module_generator.prepend_paths('PYTHONPATH', python_paths))
1463+
else:
1464+
for python_path in python_paths:
1465+
if python_path not in self.module_generator.added_paths_per_key['PYTHONPATH']:
1466+
lines.append(self.module_generator.prepend_paths('PYTHONPATH', python_path))
14651467

14661468
modloadmsg = self.cfg['modloadmsg']
14671469
if modloadmsg:

0 commit comments

Comments
 (0)