Skip to content

Commit 184219a

Browse files
Merge pull request #3764 from easybuilders/4.4.x
release EasyBuild v4.4.1
2 parents 05ab036 + 56b7c98 commit 184219a

36 files changed

+823
-283
lines changed

.github/workflows/bootstrap_script.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ jobs:
107107
EB_BOOTSTRAP_VERSION=$(grep '^EB_BOOTSTRAP_VERSION' easybuild/scripts/bootstrap_eb.py | sed 's/[^0-9.]//g')
108108
EB_BOOTSTRAP_SHA256SUM=$(sha256sum easybuild/scripts/bootstrap_eb.py | cut -f1 -d' ')
109109
EB_BOOTSTRAP_FOUND="$EB_BOOTSTRAP_VERSION $EB_BOOTSTRAP_SHA256SUM"
110-
EB_BOOTSTRAP_EXPECTED="20210106.01 c2d93de0dd91123eb4f51cfc16d1f5efb80f1d238b3d6cd100994086887a1ae0"
110+
EB_BOOTSTRAP_EXPECTED="20210618.01 e5d477d717c6d3648ba2027ab735713ba5804fbf52f4b4adcca0bc1379b44618"
111111
test "$EB_BOOTSTRAP_FOUND" = "$EB_BOOTSTRAP_EXPECTED" || (echo "Version check on bootstrap script failed $EB_BOOTSTRAP_FOUND" && exit 1)
112112
113113
# test bootstrap script
114114
export PREFIX=/tmp/$USER/$GITHUB_SHA/eb_bootstrap
115+
export EASYBUILD_BOOTSTRAP_DEPRECATED=1
115116
python easybuild/scripts/bootstrap_eb.py $PREFIX
117+
unset EASYBUILD_BOOTSTRAP_DEPRECATED
116118
# unset $PYTHONPATH to avoid mixing two EasyBuild 'installations' when testing bootstrapped EasyBuild module
117119
unset PYTHONPATH
118120
# simple sanity check on bootstrapped EasyBuild module

RELEASE_NOTES

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ 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.4.1 (July 6th 2021)
8+
----------------------
9+
10+
update/bugfix release
11+
12+
- various enhancements, including:
13+
- enhance detection of patch files supplied to 'eb' command with better error messages (#3709)
14+
- add per-step timing information (#3716)
15+
- add module-write hook (#3728)
16+
- add ignore-test-failure configuration option to ignore failing test step (#3732)
17+
- add toolchain definition for nvompic (NVHPC + OpenMPI) (#3735)
18+
- warn about generic milestone in --review-pr and --merge-pr (#3751)
19+
- various bug fixes, including:
20+
- don't override COMPILER_MODULE_NAME, inherited from Ffmpi, in Fujitsu toolchain definition (#3721)
21+
- avoid overwritting pr_nr in post_pr_test_report for reports with --include-easyblocks-from-pr (#3724, #3726)
22+
- fix crash in get_config_dict when copying modules that were imported in easyconfig file (like 'import os') (#3729)
23+
- parse C standard flags in CFLAGS for Fujitsu compiler (#3731)
24+
- fix error message for --use-ccache (#3733)
25+
- error out when passing a list to run_cmd* to avoid running wrong command unintended, unless shell=True is used (#3737)
26+
- minor fixes to output of test reports when using multiple PRs (#3741)
27+
- fix location for modules installed with intel-compilers toolchain in HierarchicalMNS by always checking toolchain compiler name against template map (#3745)
28+
- avoid checking msg attribute of GitCommandError (#3756)
29+
- consider sources provided as dict in EasyBlock.check_checksums_for (#3758)
30+
- don't make changes to software installation directory when using --sanity-check-only (#3761)
31+
- honor specified easyblock for extensions (#3762)
32+
- other changes:
33+
- make sure that tests requiring a github token have 'github' in the test name so that they can be easily filtered (#3730)
34+
- deprecate EasyBuild bootstrap script (#3742)
35+
- use temporary download folder in test_http_header_fields_urlpat (#3755)
36+
37+
738
v4.4.0 (June 2nd 2021)
839
----------------------
940

easybuild/base/testing.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import pprint
3636
import re
3737
import sys
38+
from contextlib import contextmanager
3839

3940
try:
4041
from cStringIO import StringIO # Python 2
@@ -185,6 +186,26 @@ def get_stderr(self):
185186
"""Return output captured from stderr until now."""
186187
return sys.stderr.getvalue()
187188

189+
@contextmanager
190+
def mocked_stdout_stderr(self, mock_stdout=True, mock_stderr=True):
191+
"""Context manager to mock stdout and stderr"""
192+
if mock_stdout:
193+
self.mock_stdout(True)
194+
if mock_stderr:
195+
self.mock_stderr(True)
196+
try:
197+
if mock_stdout and mock_stderr:
198+
yield sys.stdout, sys.stderr
199+
elif mock_stdout:
200+
yield sys.stdout
201+
else:
202+
yield sys.stderr
203+
finally:
204+
if mock_stdout:
205+
self.mock_stdout(False)
206+
if mock_stderr:
207+
self.mock_stderr(False)
208+
188209
def tearDown(self):
189210
"""Cleanup after running a test."""
190211
self.mock_stdout(False)

easybuild/framework/easyblock.py

Lines changed: 110 additions & 42 deletions
Large diffs are not rendered by default.

easybuild/framework/easyconfig/format/one.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,14 @@ def get_config_dict(self):
135135
# we can't use copy.deepcopy() directly because in Python 2 copying the (irrelevant) __builtins__ key fails...
136136
cfg_copy = {}
137137
for key in cfg:
138-
if key != '__builtins__':
139-
cfg_copy[key] = copy.deepcopy(cfg[key])
138+
# skip special variables like __builtins__, and imported modules (like 'os')
139+
if key != '__builtins__' and "'module'" not in str(type(cfg[key])):
140+
try:
141+
cfg_copy[key] = copy.deepcopy(cfg[key])
142+
except Exception as err:
143+
raise EasyBuildError("Failed to copy '%s' easyconfig parameter: %s" % (key, err))
144+
else:
145+
self.log.debug("Not copying '%s' variable from parsed easyconfig", key)
140146

141147
return cfg_copy
142148

easybuild/framework/easyconfig/tools.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def det_easyconfig_paths(orig_paths):
334334
:return: list of paths to easyconfig files
335335
"""
336336
try:
337-
from_prs = [int(pr_nr) for pr_nr in build_option('from_pr')]
337+
from_prs = [int(x) for x in build_option('from_pr')]
338338
except ValueError:
339339
raise EasyBuildError("Argument to --from-pr must be a comma separated list of PR #s.")
340340

@@ -539,6 +539,12 @@ def review_pr(paths=None, pr=None, colored=True, branch='develop', testing=False
539539
if missing_labels:
540540
lines.extend(['', "This PR should be labelled with %s" % ', '.join(["'%s'" % ml for ml in missing_labels])])
541541

542+
if not pr_data['milestone']:
543+
lines.extend(['', "This PR should be associated with a milestone"])
544+
elif '.x' in pr_data['milestone']['title']:
545+
lines.extend(['', "This PR is associated with a generic '.x' milestone, "
546+
"it should be associated to the next release milestone once merged"])
547+
542548
return '\n'.join(lines)
543549

544550

@@ -623,6 +629,14 @@ def categorize_files_by_type(paths):
623629
# file must exist in order to check whether it's a patch file
624630
elif os.path.isfile(path) and is_patch_file(path):
625631
res['patch_files'].append(path)
632+
elif path.endswith('.patch'):
633+
if not os.path.exists(path):
634+
raise EasyBuildError('File %s does not exist, did you mistype the path?', path)
635+
elif not os.path.isfile(path):
636+
raise EasyBuildError('File %s is expected to be a regular file, but is a folder instead', path)
637+
else:
638+
raise EasyBuildError('%s is not detected as a valid patch file. Please verify its contents!',
639+
path)
626640
else:
627641
# anything else is considered to be an easyconfig file
628642
res['easyconfigs'].append(path)

easybuild/main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
from easybuild.framework.easyconfig.tools import det_easyconfig_paths, dump_env_script, get_paths_for
5656
from easybuild.framework.easyconfig.tools import parse_easyconfigs, review_pr, run_contrib_checks, skip_available
5757
from easybuild.framework.easyconfig.tweak import obtain_ec_for, tweak
58+
from easybuild.tools.build_log import print_warning
5859
from easybuild.tools.config import find_last_log, get_repository, get_repositorypath, build_option
5960
from easybuild.tools.containers.common import containerize
6061
from easybuild.tools.docs import list_software
@@ -304,6 +305,14 @@ def main(args=None, logfile=None, do_build=None, testing=False, modtool=None):
304305
init_session_state.update({'module_list': modlist})
305306
_log.debug("Initial session state: %s" % init_session_state)
306307

308+
if options.skip_test_step:
309+
if options.ignore_test_failure:
310+
raise EasyBuildError("Found both ignore-test-failure and skip-test-step enabled. "
311+
"Please use only one of them.")
312+
else:
313+
print_warning("Will not run the test step as requested via skip-test-step. "
314+
"Consider using ignore-test-failure instead and verify the results afterwards")
315+
307316
# determine easybuild-easyconfigs package install path
308317
easyconfigs_pkg_paths = get_paths_for(subdir=EASYCONFIGS_PKG_SUBDIR)
309318
if not easyconfigs_pkg_paths:

easybuild/scripts/bootstrap_eb.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
import urllib.request as std_urllib
6363

6464

65-
EB_BOOTSTRAP_VERSION = '20210106.01'
65+
EB_BOOTSTRAP_VERSION = '20210618.01'
6666

6767
# argparse preferrred, optparse deprecated >=2.7
6868
HAVE_ARGPARSE = False
@@ -82,6 +82,9 @@
8282

8383
STAGE1_SUBDIR = 'eb_stage1'
8484

85+
# the EasyBuild bootstrap script is deprecated, and will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined
86+
EASYBUILD_BOOTSTRAP_DEPRECATED = os.environ.pop('EASYBUILD_BOOTSTRAP_DEPRECATED', None)
87+
8588
# set print_debug to True for detailed progress info
8689
print_debug = os.environ.pop('EASYBUILD_BOOTSTRAP_DEBUG', False)
8790

@@ -854,6 +857,17 @@ def main():
854857
self_txt = open(__file__).read()
855858
if IS_PY3:
856859
self_txt = self_txt.encode('utf-8')
860+
861+
url = 'https://docs.easybuild.io/en/latest/Installation.html'
862+
info("Use of the EasyBuild boostrap script is DEPRECATED (since June 2021).")
863+
info("It is strongly recommended to use one of the installation methods outlined at %s instead!\n" % url)
864+
if not EASYBUILD_BOOTSTRAP_DEPRECATED:
865+
error("The EasyBuild bootstrap script will only run if $EASYBUILD_BOOTSTRAP_DEPRECATED is defined.")
866+
else:
867+
msg = "You have opted to continue with the EasyBuild bootstrap script by defining "
868+
msg += "$EASYBUILD_BOOTSTRAP_DEPRECATED. Good luck!\n"
869+
info(msg)
870+
857871
info("EasyBuild bootstrap script (version %s, MD5: %s)" % (EB_BOOTSTRAP_VERSION, md5(self_txt).hexdigest()))
858872
info("Found Python %s\n" % '; '.join(sys.version.split('\n')))
859873

easybuild/toolchains/compiler/fujitsu.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
:author: Miguel Dias Costa (National University of Singapore)
3131
"""
3232
import os
33+
import re
3334

3435
import easybuild.tools.environment as env
3536
import easybuild.tools.systemtools as systemtools
@@ -88,6 +89,13 @@ class FujitsuCompiler(Compiler):
8889
def prepare(self, *args, **kwargs):
8990
super(FujitsuCompiler, self).prepare(*args, **kwargs)
9091

92+
# fcc doesn't accept e.g. -std=c++11 or -std=gnu++11, only -std=c11 or -std=gnu11
93+
pattern = r'-std=(gnu|c)\+\+(\d+)'
94+
if re.search(pattern, self.vars['CFLAGS']):
95+
self.log.debug("Found '-std=(gnu|c)++' in CFLAGS, fcc doesn't accept '++' here, removing it")
96+
self.vars['CFLAGS'] = re.sub(pattern, r'-std=\1\2', self.vars['CFLAGS'])
97+
self._setenv_variables()
98+
9199
# make sure the fujitsu module libraries are found (and added to rpath by wrapper)
92100
library_path = os.getenv('LIBRARY_PATH', '')
93101
libdir = os.path.join(os.getenv(TC_CONSTANT_MODULE_VAR), 'lib64')

easybuild/toolchains/fujitsu.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ class Fujitsu(Ffmpi, FujitsuFFTW, FujitsuSSL):
3636
"""Compiler toolchain for Fujitsu."""
3737
NAME = 'Fujitsu'
3838
SUBTOOLCHAIN = Ffmpi.NAME
39-
COMPILER_MODULE_NAME = []

0 commit comments

Comments
 (0)