Skip to content

Commit c1740d2

Browse files
Merge pull request #3937 from easybuilders/4.5.x
release EasyBuild v4.5.2
2 parents d18b6f0 + 54b1e90 commit c1740d2

File tree

19 files changed

+275
-385
lines changed

19 files changed

+275
-385
lines changed

.github/workflows/eb_command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-18.04
77
strategy:
88
matrix:
9-
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
9+
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10']
1010
fail-fast: false
1111
steps:
1212
- uses: actions/checkout@v2

.github/workflows/unit_tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
- python: 3.9
6363
modules_tool: ${{needs.setup.outputs.lmod8}}
6464
module_syntax: Tcl
65+
- python: '3.10'
66+
modules_tool: ${{needs.setup.outputs.lmod8}}
67+
module_syntax: Lua
68+
- python: '3.10'
69+
modules_tool: ${{needs.setup.outputs.lmod8}}
70+
module_syntax: Tcl
6571
# There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set
6672
# Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7)
6773
- python: 3.6
@@ -110,13 +116,14 @@ jobs:
110116
GITHUB_TOKEN: ${{secrets.TEST_GITHUB_TOKEN}}
111117
run: |
112118
# don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools,
119+
# and only when testing with Lua as module syntax,
113120
# to avoid hitting GitHub rate limit;
114121
# tests that require a GitHub token are skipped automatically when no GitHub token is available
115-
if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]]; then
122+
if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]] && [[ "${{matrix.modules_syntax}}" == 'Lua' ]]; then
116123
if [ ! -z $GITHUB_TOKEN ]; then
117124
if [ "x${{matrix.python}}" == 'x2.6' ];
118125
then SET_KEYRING="keyring.set_keyring(keyring.backends.file.PlaintextKeyring())";
119-
else SET_KEYRING="import keyrings; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
126+
else SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
120127
fi;
121128
python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";
122129
fi
@@ -193,7 +200,7 @@ jobs:
193200
# run test suite
194201
python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log
195202
# try and make sure output of running tests is clean (no printed messages/warnings)
196-
IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|requires Lmod as modules tool|stty: 'standard input': Inappropriate ioctl for device|CryptographyDeprecationWarning: Python 3.5|from cryptography.*default_backend|CryptographyDeprecationWarning: Python 2"
203+
IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|requires Lmod as modules tool|stty: 'standard input': Inappropriate ioctl for device|CryptographyDeprecationWarning: Python 3.5|from cryptography.*default_backend|CryptographyDeprecationWarning: Python 2|from cryptography.utils import int_from_bytes"
197204
# '|| true' is needed to avoid that Travis stops the job on non-zero exit of grep (i.e. when there are no matches)
198205
PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true)
199206
test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite\n${PRINTED_MSG}" && exit 1)

RELEASE_NOTES

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ 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.5.2 (January 24th 2022)
8+
--------------------------
9+
10+
update/bugfix release
11+
12+
- various enhancements, including:
13+
- automatically prepend value for env-for-shebang configuration setting with sysroot (#3919)
14+
- enhance update_build_option to return original value + add support for update_build_options (#3923)
15+
- fix compatibility with Python 3.10 (#3926, #3933)
16+
- also take /etc/os-release into account in get_os_name and get_os_version (#3930)
17+
- enhance get_cpu_architecture and get_cpu_family to be aware of RISC-V (#3931)
18+
- various bug fixes, including:
19+
- relax pattern checks in test_toy_exts_parallel (#3921)
20+
- use sources.easybuild.io as backup URL for downloading Environment Modules sources to run test suite (#3928)
21+
- make intelfftw toolchain component aware of GCCcore (#3929)
22+
- other changes:
23+
- deprecate use of (actual) patch files that don't have a filename ending with .patch (#3920)
24+
- remove version restriction for keyring in requirements.txt to test with latest version (#3925)
25+
- simplify requirements.txt by removing Python 2.6 support (#3927)
26+
- only run GitHub tests when testing with Lua module syntax, to avoid hitting GitHub rate limit when running tests (#3938)
27+
28+
729
v4.5.1 (December 13th 2021)
830
---------------------------
931

easybuild/base/frozendict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
It can be used as a drop-in replacement for dictionaries where immutability is desired.
2222
"""
2323
import operator
24-
from collections import Mapping
2524
from functools import reduce
2625

2726
from easybuild.base import fancylogger
27+
from easybuild.tools.py2vs3 import Mapping
2828

2929

3030
# minor adjustments:

easybuild/framework/easyblock.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2758,14 +2758,24 @@ def package_step(self):
27582758

27592759
def fix_shebang(self):
27602760
"""Fix shebang lines for specified files."""
2761+
2762+
env_for_shebang = build_option('env_for_shebang')
2763+
sysroot = build_option('sysroot')
2764+
if sysroot and not env_for_shebang.startswith(sysroot):
2765+
env_for_shebang = os.path.join(sysroot, env_for_shebang.lstrip('/'))
2766+
if os.path.exists(env_for_shebang.split(' ')[0]):
2767+
self.log.info("Path to 'env' command to use in patched shebang lines: %s", env_for_shebang)
2768+
else:
2769+
raise EasyBuildError("Path to 'env' command to use in shebang lines does not exist: %s", env_for_shebang)
2770+
27612771
for lang in ['bash', 'perl', 'python']:
27622772
shebang_regex = re.compile(r'^#![ ]*.*[/ ]%s.*' % lang)
27632773
fix_shebang_for = self.cfg['fix_%s_shebang_for' % lang]
27642774
if fix_shebang_for:
27652775
if isinstance(fix_shebang_for, string_type):
27662776
fix_shebang_for = [fix_shebang_for]
27672777

2768-
shebang = '#!%s %s' % (build_option('env_for_shebang'), lang)
2778+
shebang = '#!%s %s' % (env_for_shebang, lang)
27692779
for glob_pattern in fix_shebang_for:
27702780
paths = glob.glob(os.path.join(self.installdir, glob_pattern))
27712781
self.log.info("Fixing '%s' shebang to '%s' for files that match '%s': %s",

easybuild/scripts/install_eb_dep.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ PKG_VERSION="${PKG##*-}"
1616
CONFIG_OPTIONS=
1717
PRECONFIG_CMD=
1818

19-
if [ "$PKG_NAME" == 'modules' ] && [ "$PKG_VERSION" == '3.2.10' ]; then
19+
if [ "$PKG_NAME" == 'modules' ]; then
2020
PKG_URL="http://prdownloads.sourceforge.net/modules/${PKG}.tar.gz"
21-
BACKUP_PKG_URL="https://easybuilders.github.io/easybuild/files/${PKG}.tar.gz"
22-
export PATH="$PREFIX/Modules/$PKG_VERSION/bin:$PATH"
23-
export MOD_INIT="$PREFIX/Modules/$PKG_VERSION/init/bash"
24-
25-
elif [ "$PKG_NAME" == 'modules' ]; then
26-
PKG_URL="http://prdownloads.sourceforge.net/modules/${PKG}.tar.gz"
27-
export PATH="$PREFIX/bin:$PATH"
28-
export MOD_INIT="$PREFIX/init/bash"
21+
BACKUP_PKG_URL="https://sources.easybuild.io/e/EnvironmentModules/${PKG}.tar.gz"
22+
if [ "$PKG_VERSION" == '3.2.10' ]; then
23+
export PATH="$PREFIX/Modules/$PKG_VERSION/bin:$PATH"
24+
export MOD_INIT="$PREFIX/Modules/$PKG_VERSION/init/bash"
25+
else
26+
export PATH="$PREFIX/bin:$PATH"
27+
export MOD_INIT="$PREFIX/init/bash"
28+
fi
2929

3030
elif [ "$PKG_NAME" == 'lua' ]; then
3131
PKG_URL="http://downloads.sourceforge.net/project/lmod/${PKG}.tar.gz"

easybuild/toolchains/fft/intelfftw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _set_fftw_variables(self):
6262
compsuff = '_intel'
6363
elif get_software_root('PGI'):
6464
compsuff = '_pgi'
65-
elif get_software_root('GCC'):
65+
elif get_software_root('GCC') or get_software_root('GCCcore'):
6666
compsuff = '_gnu'
6767
else:
6868
error_msg = "Not using Intel compilers, PGI nor GCC, don't know compiler suffix for FFTW libraries."

easybuild/tools/config.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,27 @@ def update_build_option(key, value):
590590
"""
591591
# BuildOptions() is a (singleton) frozen dict, so this is less straightforward that it seems...
592592
build_options = BuildOptions()
593+
orig_value = build_options._FrozenDict__dict[key]
593594
build_options._FrozenDict__dict[key] = value
594595
_log.warning("Build option '%s' was updated to: %s", key, build_option(key))
595596

597+
# Return original value, so it can be restored later if needed
598+
return orig_value
599+
600+
601+
def update_build_options(key_value_dict):
602+
"""
603+
Update build options as specified by the given dictionary (where keys are assumed to be build option names).
604+
Returns dictionary with original values for the updated build options.
605+
"""
606+
orig_key_value_dict = {}
607+
for key, value in key_value_dict.items():
608+
orig_key_value_dict[key] = update_build_option(key, value)
609+
610+
# Return original key-value pairs in a dictionary.
611+
# This way, they can later be restored by a single call to update_build_options(orig_key_value_dict)
612+
return orig_key_value_dict
613+
596614

597615
def build_path():
598616
"""

easybuild/tools/filetools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,8 @@ def create_patch_info(patch_spec):
14931493
str(patch_spec))
14941494

14951495
elif isinstance(patch_spec, string_type):
1496+
if not patch_spec.endswith('.patch'):
1497+
_log.deprecated("Use of patch file with filename that doesn't end with .patch: %s" % patch_spec, '5.0')
14961498
patch_info = {'name': patch_spec}
14971499
else:
14981500
error_msg = "Wrong patch spec, should be string of 2-tuple with patch name + argument: %s"

0 commit comments

Comments
 (0)