Skip to content

Commit 2631db1

Browse files
committed
add deprecation for EasyBlock.expand_module_search_path
1 parent df75916 commit 2631db1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

easybuild/framework/easyblock.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,24 @@ def inject_module_extra_paths(self):
17541754
msg += f"and paths='{env_var}'"
17551755
self.log.debug(msg)
17561756

1757+
def expand_module_search_path(self, search_path, path_type=ModEnvVarType.PATH_WITH_FILES):
1758+
"""
1759+
Expand given path glob and return list of suitable paths to be used as search paths:
1760+
- Paths must point to existing files/directories
1761+
- Relative paths are relative to installation prefix root and are kept relative after expansion
1762+
- Absolute paths are kept as absolute paths after expansion
1763+
- Follow symlinks and resolve their paths (avoids duplicate paths through symlinks)
1764+
- :path_type: ModEnvVarType that controls requirements for population of directories
1765+
- PATH: no requirements, can be empty
1766+
- PATH_WITH_FILES: must contain at least one file in them (default)
1767+
- PATH_WITH_TOP_FILES: increase stricness to require files in top level directory
1768+
"""
1769+
self.log.deprecated(
1770+
"expand_module_search_path() is deprecated, use EasyBlock.module_load_environment.expand instead",
1771+
'5.1',
1772+
)
1773+
return False
1774+
17571775
def make_module_req_guess(self):
17581776
"""
17591777
A dictionary of common search path variables to be loaded by environment modules

0 commit comments

Comments
 (0)