Skip to content

Commit 633e870

Browse files
author
Alan O'Cais
committed
Respect order of paths in variables such as LD_LIBRARY_PATH
1 parent 4208302 commit 633e870

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
@@ -1378,7 +1378,7 @@ def make_module_req(self):
13781378
else:
13791379
# Expand globs but only if the string is non-empty
13801380
# empty string is a valid value here (i.e. to prepend the installation prefix, cfr $CUDA_HOME)
1381-
paths = sorted(sum((glob.glob(path) if path else [path] for path in reqs), [])) # sum flattens to list
1381+
paths = sum((glob.glob(path) if path else [path] for path in reqs), []) # sum flattens to list
13821382

13831383
# If lib64 is just a symlink to lib we fixup the paths to avoid duplicates
13841384
lib64_is_symlink = (all(os.path.isdir(path) for path in ['lib', 'lib64'])
@@ -1396,7 +1396,7 @@ def make_module_req(self):
13961396
self.log.info("Fixed symlink lib64 in paths for %s: %s -> %s", key, paths, fixed_paths)
13971397
paths = fixed_paths
13981398
# Use a set to remove duplicates, e.g. by having lib64 and lib which get fixed to lib and lib above
1399-
paths = sorted(set(paths))
1399+
paths = set(paths)
14001400
if key in keys_requiring_files:
14011401
# only retain paths that contain at least one file
14021402
retained_paths = [

0 commit comments

Comments
 (0)