Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump minimum required Lmod to 8.0.0 #4424

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
setup:
runs-on: ubuntu-20.04
outputs:
lmod7: Lmod-7.8.22
lmod8: Lmod-8.7.6
modulesTcl: modules-tcl-1.147
modules3: modules-3.2.10
Expand All @@ -29,7 +28,6 @@ jobs:
modules_tool:
# use variables defined by 'setup' job above, see also
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context
- ${{needs.setup.outputs.lmod7}}
- ${{needs.setup.outputs.lmod8}}
- ${{needs.setup.outputs.modulesTcl}}
- ${{needs.setup.outputs.modules3}}
Expand Down
17 changes: 6 additions & 11 deletions easybuild/tools/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,9 +1406,8 @@ class Lmod(ModulesTool):
NAME = "Lmod"
COMMAND = 'lmod'
COMMAND_ENVIRONMENT = 'LMOD_CMD'
REQ_VERSION = '6.5.1'
DEPR_VERSION = '7.0.0'
REQ_VERSION_DEPENDS_ON = '7.6.1'
REQ_VERSION = '8.0.0'
DEPR_VERSION = '8.0.0'
VERSION_REGEXP = r"^Modules\s+based\s+on\s+Lua:\s+Version\s+(?P<version>\d\S*)\s"

SHOW_HIDDEN_OPTION = '--show-hidden'
Expand All @@ -1427,7 +1426,7 @@ def __init__(self, *args, **kwargs):
super(Lmod, self).__init__(*args, **kwargs)
version = StrictVersion(self.version)

self.supports_depends_on = version >= self.REQ_VERSION_DEPENDS_ON
self.supports_depends_on = True
# See https://lmod.readthedocs.io/en/latest/125_personal_spider_cache.html
if version >= '8.7.12':
self.USER_CACHE_DIR = os.path.join(os.path.expanduser('~'), '.cache', 'lmod')
Expand Down Expand Up @@ -1586,13 +1585,9 @@ def module_wrapper_exists(self, mod_name):
Determine whether a module wrapper with specified name exists.
First check for wrapper defined in .modulerc.lua, fall back to also checking .modulerc (Tcl syntax).
"""
res = None

# first consider .modulerc.lua with Lmod 7.8 (or newer)
if StrictVersion(self.version) >= StrictVersion('7.8'):
mod_wrapper_regex_template = r'^module_version\("(?P<wrapped_mod>.*)", "%s"\)$'
res = super(Lmod, self).module_wrapper_exists(mod_name, modulerc_fn='.modulerc.lua',
mod_wrapper_regex_template=mod_wrapper_regex_template)
mod_wrapper_regex_template = r'^module_version\("(?P<wrapped_mod>.*)", "%s"\)$'
res = super(Lmod, self).module_wrapper_exists(mod_name, modulerc_fn='.modulerc.lua',
mod_wrapper_regex_template=mod_wrapper_regex_template)

# fall back to checking for .modulerc in Tcl syntax
if res is None:
Expand Down