Skip to content

Commit f2a60b4

Browse files
committed
Merge branch '5.0.x' of github.com:easybuilders/easybuild-framework into 5.0.x
2 parents 3012af6 + 2139d3e commit f2a60b4

File tree

6 files changed

+13
-17
lines changed

6 files changed

+13
-17
lines changed

.github/workflows/unit_tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
setup:
1414
runs-on: ubuntu-20.04
1515
outputs:
16-
lmod7: Lmod-7.8.22
1716
lmod8: Lmod-8.7.6
1817
modulesTcl: modules-tcl-1.147
1918
modules3: modules-3.2.10
@@ -29,7 +28,6 @@ jobs:
2928
modules_tool:
3029
# use variables defined by 'setup' job above, see also
3130
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context
32-
- ${{needs.setup.outputs.lmod7}}
3331
- ${{needs.setup.outputs.lmod8}}
3432
- ${{needs.setup.outputs.modulesTcl}}
3533
- ${{needs.setup.outputs.modules3}}

easybuild/scripts/rpath_wrapper_template.sh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
##
33
# Copyright 2016-2023 Ghent University
44
#

easybuild/tools/modules.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,9 +1423,8 @@ class Lmod(ModulesTool):
14231423
NAME = "Lmod"
14241424
COMMAND = 'lmod'
14251425
COMMAND_ENVIRONMENT = 'LMOD_CMD'
1426-
REQ_VERSION = '6.5.1'
1427-
DEPR_VERSION = '7.0.0'
1428-
REQ_VERSION_DEPENDS_ON = '7.6.1'
1426+
REQ_VERSION = '8.0.0'
1427+
DEPR_VERSION = '8.0.0'
14291428
VERSION_REGEXP = r"^Modules\s+based\s+on\s+Lua:\s+Version\s+(?P<version>\d\S*)\s"
14301429

14311430
SHOW_HIDDEN_OPTION = '--show-hidden'
@@ -1444,7 +1443,7 @@ def __init__(self, *args, **kwargs):
14441443
super(Lmod, self).__init__(*args, **kwargs)
14451444
version = StrictVersion(self.version)
14461445

1447-
self.supports_depends_on = version >= self.REQ_VERSION_DEPENDS_ON
1446+
self.supports_depends_on = True
14481447
# See https://lmod.readthedocs.io/en/latest/125_personal_spider_cache.html
14491448
if version >= '8.7.12':
14501449
self.USER_CACHE_DIR = os.path.join(os.path.expanduser('~'), '.cache', 'lmod')
@@ -1603,13 +1602,9 @@ def module_wrapper_exists(self, mod_name):
16031602
Determine whether a module wrapper with specified name exists.
16041603
First check for wrapper defined in .modulerc.lua, fall back to also checking .modulerc (Tcl syntax).
16051604
"""
1606-
res = None
1607-
1608-
# first consider .modulerc.lua with Lmod 7.8 (or newer)
1609-
if StrictVersion(self.version) >= StrictVersion('7.8'):
1610-
mod_wrapper_regex_template = r'^module_version\("(?P<wrapped_mod>.*)", "%s"\)$'
1611-
res = super(Lmod, self).module_wrapper_exists(mod_name, modulerc_fn='.modulerc.lua',
1612-
mod_wrapper_regex_template=mod_wrapper_regex_template)
1605+
mod_wrapper_regex_template = r'^module_version\("(?P<wrapped_mod>.*)", "%s"\)$'
1606+
res = super(Lmod, self).module_wrapper_exists(mod_name, modulerc_fn='.modulerc.lua',
1607+
mod_wrapper_regex_template=mod_wrapper_regex_template)
16131608

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

easybuild/tools/run.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import os
4242
import re
4343
import signal
44+
import shutil
4445
import subprocess
4546
import sys
4647
import tempfile
@@ -276,7 +277,9 @@ def to_cmd_str(cmd):
276277
# (which could be dash instead of bash, like on Ubuntu, see https://wiki.ubuntu.com/DashAsBinSh)
277278
# stick to None (default value) when not running command via a shell
278279
if use_bash:
279-
executable, shell = '/bin/bash', True
280+
bash = shutil.which('bash')
281+
_log.info(f"Path to bash that will be used to run shell commands: {bash}")
282+
executable, shell = bash, True
280283
else:
281284
executable, shell = None, False
282285

eb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
##
33
# Copyright 2009-2023 Ghent University
44
#

test/framework/easyblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ def test_extensions_sanity_check(self):
21012101
eb.silent = True
21022102
error_pattern = r"Sanity check failed: extensions sanity check failed for 1 extensions: toy\n"
21032103
error_pattern += r"failing sanity check for 'toy' extension: "
2104-
error_pattern += r'command "thisshouldfail" failed; output:\n/bin/bash:.* thisshouldfail: command not found'
2104+
error_pattern += r'command "thisshouldfail" failed; output:\n.* thisshouldfail: command not found'
21052105
with self.mocked_stdout_stderr():
21062106
self.assertErrorRegex(EasyBuildError, error_pattern, eb.run_all_steps, True)
21072107

0 commit comments

Comments
 (0)