Skip to content

Commit 6a0a7bf

Browse files
Merge pull request #4499 from easybuilders/4.9.x
release EasyBuild v4.9.1
2 parents 434151c + 5eca6bd commit 6a0a7bf

File tree

318 files changed

+1505
-681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+1505
-681
lines changed

.github/workflows/container_tests_apptainer.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,18 @@ jobs:
2929
- name: install OS & Python packages
3030
run: |
3131
# for building CentOS 7 container images
32-
sudo apt-get install rpm
33-
sudo apt-get install dnf
32+
APT_PKGS="rpm dnf"
3433
# for modules tool
35-
sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
34+
APT_PKGS+=" lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev"
35+
36+
# Avoid apt-get update, as we don't really need it,
37+
# and it does more harm than good (it's fairly expensive, and it results in flaky test runs)
38+
if ! sudo apt-get install $APT_PKGS; then
39+
# Try to update cache, then try again to resolve 404s of old packages
40+
sudo apt-get update -yqq || true
41+
sudo apt-get install $APT_PKGS
42+
fi
43+
3644
# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
3745
# needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
3846
if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
echo "Not testing with '${module_syntax}' as module syntax with '${EASYBUILD_MODULES_TOOL}' as modules tool"
179179
continue
180180
fi
181-
printf '\n\n=====================> Using $module_syntax module syntax <=====================\n\n'
181+
printf "\n\n=====================> Using $module_syntax module syntax <=====================\n\n"
182182
export EASYBUILD_MODULE_SYNTAX="${module_syntax}"
183183
export TEST_EASYBUILD_MODULE_SYNTAX="${EASYBUILD_MODULE_SYNTAX}"
184184

RELEASE_NOTES

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@ For more detailed information, please see the git log.
44
These release notes can also be consulted at https://easybuild.readthedocs.io/en/latest/Release_notes.html.
55

66

7+
v4.9.1 (5 April 2024)
8+
---------------------
9+
10+
update/bugfix release
11+
12+
- various enhancements, including:
13+
- make `is_rpath_wrapper` faster by only checking file contents if file is not located in subdirectory of RPATH wrapper subdirectory (#4406)
14+
- add terse support to `--missing-modules` (#4407)
15+
- adapt version pattern for EnvironmentModules to allow using development version (#4416)
16+
- use `--all` option with EnvironmentModules v4.6+ to get available hidden modules (#4417)
17+
- add support for appending to path environment variables via `modextrapaths_append` + add corresponding `allow_append_abs_path` (#4436)
18+
- improve output produced by `--check-github` (#4437)
19+
- add script for updating local git repos with `develop` branch (#4438)
20+
- show error when multiple PR options are passed (#4440)
21+
- improve `findPythonDeps` script to recognize non-canonical package names (#4445)
22+
- add support for `--from-commit` and `--include-easyblocks-from-commit` (#4468)
23+
- improve logging & handling of (empty) `--optarch` values (#4481)
24+
- add `--short` option to `findUpdatedEcs` script (#4488)
25+
- add generic GCC and Clang compiler flags for RISC-V (#4489)
26+
- various bug fixes, including:
27+
- clean up log file of `EasyBlock` instance in `check_sha256_checksums` (#4452)
28+
- fix description of `backup-modules` configuration option (#4456)
29+
- replace `'` with `"` for `printf` in CI workflow for running test suite to have bash replace a variable (#4461)
30+
- use `cp -dR` instead of `cp -a` for shell script "extraction" (#4465)
31+
- fix link to documentation in `close_pr` message (#4466)
32+
- fix `test_github_merge_pr` by using more recent easyconfigs PR (#4470)
33+
- add workaround for 404 error when installing packages in CI workflow for testing Apptainer integration (#4472)
34+
- other changes:
35+
- clean up & speed up environment checks (#4409)
36+
- use more performant and concise dict construction by using dict comprehensions (#4410)
37+
- remove superflous string formatting (#4411)
38+
- clean up uses of `getattr` and `hasattr` (#4412)
39+
- update copyright lines to 2024 (#4494)
40+
41+
742
v4.9.0 (30 December 2023)
843
-------------------------
944

easybuild/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##
2-
# Copyright 2011-2023 Ghent University
2+
# Copyright 2011-2024 Ghent University
33
#
44
# This file is part of EasyBuild,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

easybuild/base/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2015-2023 Ghent University
2+
# Copyright 2015-2024 Ghent University
33
#
44
# This file is part of EasyBuild,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

easybuild/base/fancylogger.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2011-2023 Ghent University
2+
# Copyright 2011-2024 Ghent University
33
#
44
# This file is part of EasyBuild,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
@@ -147,10 +147,10 @@ def _env_to_boolean(varname, default=False):
147147
>>> _env_to_boolean('NO_FOOBAR')
148148
False
149149
"""
150-
if varname not in os.environ:
150+
try:
151+
return os.environ[varname].lower() in ('1', 'yes', 'true', 'y')
152+
except KeyError:
151153
return default
152-
else:
153-
return os.environ.get(varname).lower() in ('1', 'yes', 'true', 'y')
154154

155155

156156
OPTIMIZED_ANSWER = "not available in optimized mode"
@@ -286,7 +286,7 @@ def makeRecord(self, name, level, pathname, lineno, msg, args, excinfo, func=Non
286286
overwrite make record to use a fancy record (with more options)
287287
"""
288288
logrecordcls = logging.LogRecord
289-
if hasattr(self, 'fancyrecord') and self.fancyrecord:
289+
if getattr(self, 'fancyrecord', None):
290290
logrecordcls = FancyLogRecord
291291
try:
292292
new_msg = str(msg)
@@ -911,16 +911,15 @@ def resetroot():
911911
_default_logTo = None
912912
if 'FANCYLOG_SERVER' in os.environ:
913913
server = os.environ['FANCYLOG_SERVER']
914-
port = DEFAULT_UDP_PORT
915914
if ':' in server:
916915
server, port = server.split(':')
916+
else:
917+
port = DEFAULT_UDP_PORT
917918

918919
# maybe the port was specified in the FANCYLOG_SERVER_PORT env var. this takes precedence
919-
if 'FANCYLOG_SERVER_PORT' in os.environ:
920-
port = int(os.environ['FANCYLOG_SERVER_PORT'])
921-
port = int(port)
920+
port = os.environ.get('FANCYLOG_SERVER_PORT', port)
922921

923-
logToUDP(server, port)
922+
logToUDP(server, int(port))
924923
_default_logTo = logToUDP
925924
else:
926925
# log to screen by default

easybuild/base/generaloption.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2011-2023 Ghent University
2+
# Copyright 2011-2024 Ghent University
33
#
44
# This file is part of EasyBuild,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
@@ -90,7 +90,7 @@ def set_columns(cols=None):
9090
pass
9191

9292
if cols is not None:
93-
os.environ['COLUMNS'] = "%s" % cols
93+
os.environ['COLUMNS'] = str(cols)
9494

9595

9696
def what_str_list_tuple(name):
@@ -199,7 +199,8 @@ class ExtOption(CompleterOption):
199199
ALWAYS_TYPED_ACTIONS = Option.ALWAYS_TYPED_ACTIONS + EXTOPTION_EXTRA_OPTIONS
200200

201201
TYPE_STRLIST = ['%s%s' % (name, klass) for klass in ['list', 'tuple'] for name in ['str', 'path']]
202-
TYPE_CHECKER = dict([(x, check_str_list_tuple) for x in TYPE_STRLIST] + list(Option.TYPE_CHECKER.items()))
202+
TYPE_CHECKER = {x: check_str_list_tuple for x in TYPE_STRLIST}
203+
TYPE_CHECKER.update(Option.TYPE_CHECKER)
203204
TYPES = tuple(TYPE_STRLIST + list(Option.TYPES))
204205
BOOLEAN_ACTIONS = ('store_true', 'store_false',) + EXTOPTION_LOG
205206

@@ -807,7 +808,7 @@ def get_env_options(self):
807808
epilogprefixtxt += "eg. --some-opt is same as setting %(prefix)s_SOME_OPT in the environment."
808809
self.epilog.append(epilogprefixtxt % {'prefix': self.envvar_prefix})
809810

810-
candidates = dict([(k, v) for k, v in os.environ.items() if k.startswith("%s_" % self.envvar_prefix)])
811+
candidates = {k: v for k, v in os.environ.items() if k.startswith("%s_" % self.envvar_prefix)}
811812

812813
for opt in self._get_all_options():
813814
if opt._long_opts is None:
@@ -822,8 +823,8 @@ def get_env_options(self):
822823
self.environment_arguments.append("%s=%s" % (lo, val))
823824
else:
824825
# interpretation of values: 0/no/false means: don't set it
825-
if ("%s" % val).lower() not in ("0", "no", "false",):
826-
self.environment_arguments.append("%s" % lo)
826+
if str(val).lower() not in ("0", "no", "false",):
827+
self.environment_arguments.append(str(lo))
827828
else:
828829
self.log.debug("Environment variable %s is not set" % env_opt_name)
829830

@@ -1031,7 +1032,7 @@ def main_options(self):
10311032
# make_init is deprecated
10321033
if hasattr(self, 'make_init'):
10331034
self.log.debug('main_options: make_init is deprecated. Rename function to main_options.')
1034-
getattr(self, 'make_init')()
1035+
self.make_init()
10351036
else:
10361037
# function names which end with _options and do not start with main or _
10371038
reg_main_options = re.compile("^(?!_|main).*_options$")
@@ -1189,7 +1190,7 @@ def add_group_parser(self, opt_dict, description, prefix=None, otherdefaults=Non
11891190
for extra_detail in details[4:]:
11901191
if isinstance(extra_detail, (list, tuple,)):
11911192
# choices
1192-
nameds['choices'] = ["%s" % x for x in extra_detail] # force to strings
1193+
nameds['choices'] = [str(x) for x in extra_detail] # force to strings
11931194
hlp += ' (choices: %s)' % ', '.join(nameds['choices'])
11941195
elif isinstance(extra_detail, string_type) and len(extra_detail) == 1:
11951196
args.insert(0, "-%s" % extra_detail)

easybuild/base/optcomplete.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -513,14 +513,15 @@ def autocomplete(parser, arg_completer=None, opt_completer=None, subcmd_complete
513513
if option:
514514
if option.nargs > 0:
515515
optarg = True
516-
if hasattr(option, 'completer'):
516+
try:
517517
completer = option.completer
518-
elif option.choices:
519-
completer = ListCompleter(option.choices)
520-
elif option.type in ('string',):
521-
completer = opt_completer
522-
else:
523-
completer = NoneCompleter()
518+
except AttributeError:
519+
if option.choices:
520+
completer = ListCompleter(option.choices)
521+
elif option.type in ('string',):
522+
completer = opt_completer
523+
else:
524+
completer = NoneCompleter()
524525
# Warn user at least, it could help him figure out the problem.
525526
elif hasattr(option, 'completer'):
526527
msg = "Error: optparse option with a completer does not take arguments: %s" % (option)
@@ -616,11 +617,9 @@ class CmdComplete(object):
616617
def autocomplete(self, completer=None):
617618
parser = OPTIONPARSER_CLASS(self.__doc__.strip())
618619
if hasattr(self, 'addopts'):
619-
fnc = getattr(self, 'addopts')
620-
fnc(parser)
620+
self.addopts(parser)
621621

622-
if hasattr(self, 'completer'):
623-
completer = getattr(self, 'completer')
622+
completer = getattr(self, 'completer', completer)
624623

625624
return autocomplete(parser, completer)
626625

easybuild/base/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2014-2023 Ghent University
2+
# Copyright 2014-2024 Ghent University
33
#
44
# This file is part of EasyBuild,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

easybuild/framework/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##
2-
# Copyright 2009-2023 Ghent University
2+
# Copyright 2009-2024 Ghent University
33
#
44
# This file is part of EasyBuild,
55
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),

0 commit comments

Comments
 (0)