Skip to content

Commit efbfd20

Browse files
committed
Merge branch '5.0.x' into run_shell_cmd_out_files
2 parents 05374ad + c073716 commit efbfd20

File tree

16 files changed

+106
-31
lines changed

16 files changed

+106
-31
lines changed

.github/workflows/container_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
ls dist
7575
export PREFIX=/tmp/$USER/$GITHUB_SHA
7676
pip install --prefix $PREFIX dist/easybuild-framework*tar.gz
77-
pip install --prefix $PREFIX https://github.com/easybuilders/easybuild-easyblocks/archive/develop.tar.gz
77+
pip install --prefix $PREFIX https://github.com/easybuilders/easybuild-easyblocks/archive/5.0.x.tar.gz
7878
7979
- name: run test
8080
run: |
@@ -95,7 +95,7 @@ jobs:
9595
echo '%_dbpath %{_var}/lib/rpm' >> $HOME/.rpmmacros
9696
# build CentOS 7 container image for bzip2 1.0.8 using EasyBuild;
9797
# see https://docs.easybuild.io/en/latest/Containers.html
98-
curl -OL https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/develop/easybuild/easyconfigs/b/bzip2/bzip2-1.0.8.eb
98+
curl -OL https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/5.0.x/easybuild/easyconfigs/b/bzip2/bzip2-1.0.8.eb
9999
export EASYBUILD_CONTAINERPATH=$PWD
100100
export EASYBUILD_CONTAINER_CONFIG='bootstrap=docker,from=ghcr.io/easybuilders/centos-7.9-python3-amd64'
101101
eb bzip2-1.0.8.eb --containerize --experimental --container-build-image

.github/workflows/container_tests_apptainer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
ls dist
6767
export PREFIX=/tmp/$USER/$GITHUB_SHA
6868
pip install --prefix $PREFIX dist/easybuild-framework*tar.gz
69-
pip install --prefix $PREFIX https://github.com/easybuilders/easybuild-easyblocks/archive/develop.tar.gz
69+
pip install --prefix $PREFIX https://github.com/easybuilders/easybuild-easyblocks/archive/5.0.x.tar.gz
7070
7171
- name: run test
7272
run: |
@@ -87,7 +87,7 @@ jobs:
8787
echo '%_dbpath %{_var}/lib/rpm' >> $HOME/.rpmmacros
8888
# build CentOS 7 container image for bzip2 1.0.8 using EasyBuild;
8989
# see https://docs.easybuild.io/en/latest/Containers.html
90-
curl -OL https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/develop/easybuild/easyconfigs/b/bzip2/bzip2-1.0.8.eb
90+
curl -OL https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/5.0.x/easybuild/easyconfigs/b/bzip2/bzip2-1.0.8.eb
9191
export EASYBUILD_CONTAINERPATH=$PWD
9292
export EASYBUILD_CONTAINER_CONFIG='bootstrap=docker,from=ghcr.io/easybuilders/centos-7.9-python3-amd64'
9393
export EASYBUILD_CONTAINER_TYPE='apptainer'

.github/workflows/end2end.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ jobs:
2525
run: |
2626
cd $HOME
2727
for pkg in easyblocks easyconfigs; do
28-
curl -OL https://github.com/easybuilders/easybuild-${pkg}/archive/develop.tar.gz
29-
tar xfz develop.tar.gz
30-
rm -f develop.tar.gz
28+
curl -OL https://github.com/easybuilders/easybuild-${pkg}/archive/5.0.x.tar.gz
29+
tar xfz 5.0.x.tar.gz
30+
rm -f 5.0.x.tar.gz
3131
done
3232
3333
- name: Set up environment
3434
shell: bash
3535
run: |
3636
# collect environment variables to be set in subsequent steps in script that can be sourced
3737
echo "export PATH=$PWD:$PATH" > /tmp/eb_env
38-
echo "export PYTHONPATH=$PWD:$HOME/easybuild-easyblocks-develop:$HOME/easybuild-easyconfigs-develop" >> /tmp/eb_env
38+
echo "export PYTHONPATH=$PWD:$HOME/easybuild-easyblocks-5.0.x:$HOME/easybuild-easyconfigs-5.0.x" >> /tmp/eb_env
3939
4040
- name: Run commands to check test environment
4141
shell: bash

.github/workflows/unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ jobs:
101101
# and are only run after the PR gets merged
102102
GITHUB_TOKEN: ${{secrets.CI_UNIT_TESTS_GITHUB_TOKEN}}
103103
run: |
104-
# don't install GitHub token when testing with Lmod 7.x or non-Lmod module tools, to avoid hitting GitHub rate limit;
104+
# only install GitHub token when testing with Lmod 8.x + Python 3.6 or 3.9, to avoid hitting GitHub rate limit;
105105
# tests that require a GitHub token are skipped automatically when no GitHub token is available
106-
if [[ ! "${{matrix.modules_tool}}" =~ 'Lmod-7' ]] && [[ ! "${{matrix.modules_tool}}" =~ 'modules-' ]]; then
106+
if [[ "${{matrix.modules_tool}}" =~ 'Lmod-8' ]] && [[ "${{matrix.python}}" =~ 3.[69] ]]; then
107107
if [ ! -z $GITHUB_TOKEN ]; then
108108
SET_KEYRING="import keyrings.alt.file; keyring.set_keyring(keyrings.alt.file.PlaintextKeyring())";
109109
python -c "import keyring; $SET_KEYRING; keyring.set_password('github_token', 'easybuild_test', '$GITHUB_TOKEN')";

RELEASE_NOTES

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ 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.8.2 (29 October 2023)
8+
------------------------
9+
10+
update/bugfix release
11+
12+
- various enhancements, including:
13+
- add support for `%(sysroot)s` template value (#4359)
14+
- add `dependency_names` method to `EasyConfig` class to get set of names of (direct) dependencies (#4360)
15+
- various bug fixes, including:
16+
- add CI workflow to run unit tests with Python 2 (again) (#4333)
17+
- fix typo in help message for `--silence-hook-trigger` (#4343)
18+
- include major version (`*majver`) templates in auto-generated documentation (#4347)
19+
- reset `tempfile.tempdir` to `None` to avoid that tmpdir path gets progressively deeper with each easystack item (#4350)
20+
- fix `findPythonDeps.py` script when called with an (absolute or relative) path to an easyconfig instead of a filename (#4365)
21+
- fix broken test for `reasons_for_closing`, which fails because commit status of easyconfigs PR is no longer available (#4366)
22+
- other changes:
23+
- reduce number of CI jobs by testing for Lua and Tcl module syntax in a single CI job (#4192)
24+
25+
726
v4.8.1 (11 September 2023)
827
--------------------------
928

easybuild/framework/easyconfig/easyconfig.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,15 @@ def dependencies(self, build_only=False):
11171117

11181118
return retained_deps
11191119

1120+
def dependency_names(self, build_only=False):
1121+
"""
1122+
Return a set of names of all (direct) dependencies after filtering.
1123+
Iterable builddependencies are flattened when not iterating.
1124+
1125+
:param build_only: only return build dependencies, discard others
1126+
"""
1127+
return {dep['name'] for dep in self.dependencies(build_only=build_only) if dep['name']}
1128+
11201129
def builddependencies(self):
11211130
"""
11221131
Return a flat list of the parsed build dependencies

easybuild/framework/easyconfig/templates.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
# template values which are only generated dynamically
9090
TEMPLATE_NAMES_DYNAMIC = [
9191
('arch', "System architecture (e.g. x86_64, aarch64, ppc64le, ...)"),
92+
('sysroot', "Location root directory of system, prefix for standard paths like /usr/lib and /usr/include"
93+
"as specify by the --sysroot configuration option"),
9294
('mpi_cmd_prefix', "Prefix command for running MPI programs (with default number of ranks)"),
9395
('cuda_compute_capabilities', "Comma-separated list of CUDA compute capabilities, as specified via "
9496
"--cuda-compute-capabilities configuration option or via cuda_compute_capabilities easyconfig parameter"),
@@ -197,6 +199,9 @@ def template_constant_dict(config, ignore=None, toolchain=None):
197199
# set 'arch' for system architecture based on 'machine' (4th) element of platform.uname() return value
198200
template_values['arch'] = platform.uname()[4]
199201

202+
# set 'sysroot' template based on 'sysroot' configuration option, using empty string as fallback
203+
template_values['sysroot'] = build_option('sysroot') or ''
204+
200205
# step 1: add TEMPLATE_NAMES_EASYCONFIG
201206
for name in TEMPLATE_NAMES_EASYCONFIG:
202207
if name in ignore:

easybuild/scripts/findPythonDeps.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ def run_cmd(arguments, action_desc, capture_stderr=True, **kwargs):
5555
extra_args['universal_newlines'] = True
5656
stderr = subprocess.STDOUT if capture_stderr else subprocess.PIPE
5757
p = subprocess.Popen(arguments, stdout=subprocess.PIPE, stderr=stderr, **extra_args)
58-
out, _ = p.communicate()
58+
out, err = p.communicate()
5959
if p.returncode != 0:
60-
raise RuntimeError('Failed to %s: %s' % (action_desc, out))
60+
if err:
61+
err = "\nSTDERR:\n" + err
62+
raise RuntimeError('Failed to %s: %s%s' % (action_desc, out, err))
6163
return out
6264

6365

@@ -171,20 +173,23 @@ def print_deps(package, verbose):
171173
capture_stderr=False,
172174
action_desc='Get missing dependencies'
173175
)
176+
excluded_dep = '(%s)' % os.path.basename(args.ec)
174177
missing_deps = [dep for dep in missing_dep_out.split('\n')
175-
if dep.startswith('*') and '(%s)' % args.ec not in dep
178+
if dep.startswith('*') and excluded_dep not in dep
176179
]
177180
if missing_deps:
178181
print('You need to install all modules on which %s depends first!' % args.ec)
179182
print('\n\t'.join(['Missing:'] + missing_deps))
180183
sys.exit(1)
181184

185+
# If the --ec argument is a (relative) existing path make it absolute so we can find it after the chdir
186+
ec_arg = os.path.abspath(args.ec) if os.path.exists(args.ec) else args.ec
182187
with temporary_directory() as tmp_dir:
183188
old_dir = os.getcwd()
184189
os.chdir(tmp_dir)
185190
if args.verbose:
186191
print('Running EasyBuild to get build environment')
187-
run_cmd(['eb', args.ec, '--dump-env', '--force'], action_desc='Dump build environment')
192+
run_cmd(['eb', ec_arg, '--dump-env', '--force'], action_desc='Dump build environment')
188193
os.chdir(old_dir)
189194

190195
cmd = "source %s/*.env && python %s '%s'" % (tmp_dir, sys.argv[0], args.package)

easybuild/toolchains/compiler/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Gcc(Compiler):
5050

5151
COMPILER_FAMILY = TC_CONSTANT_GCC
5252
COMPILER_UNIQUE_OPTS = {
53-
'loop': (False, "Automatic loop parallellisation"),
53+
'loop': (False, "Automatic loop parallelisation"),
5454
'f2c': (False, "Generate code compatible with f2c and f77"),
5555
'lto': (False, "Enable Link Time Optimization"),
5656
}

easybuild/tools/options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ def basic_options(self):
275275
'only-blocks': ("Only build listed blocks", 'strlist', 'extend', None, 'b', {'metavar': 'BLOCKS'}),
276276
'rebuild': ("Rebuild software, even if module already exists (don't skip OS dependencies checks)",
277277
None, 'store_true', False),
278-
'robot': ("Enable dependency resolution, using easyconfigs in specified paths",
279-
'pathlist', 'store_or_None', [], 'r', {'metavar': 'PATH[%sPATH]' % os.pathsep}),
278+
'robot': ("Enable dependency resolution, optionally consider additional paths to search for easyconfigs",
279+
'pathlist', 'store_or_None', [], 'r', {'metavar': '[PATH[%sPATH]]' % os.pathsep}),
280280
'robot-paths': ("Additional paths to consider by robot for easyconfigs (--robot paths get priority)",
281281
'pathlist', 'add_flex', self.default_robot_paths, {'metavar': 'PATH[%sPATH]' % os.pathsep}),
282282
'search-paths': ("Additional locations to consider in --search (next to --robot and --robot-paths paths)",
@@ -467,7 +467,7 @@ def override_options(self):
467467
'output-style': ("Control output style; auto implies using Rich if available to produce rich output, "
468468
"with fallback to basic colored output",
469469
'choice', 'store', OUTPUT_STYLE_AUTO, OUTPUT_STYLES),
470-
'parallel': ("Specify (maximum) level of parallellism used during build procedure",
470+
'parallel': ("Specify (maximum) level of parallelism used during build procedure",
471471
'int', 'store', None),
472472
'parallel-extensions-install': ("Install list of extensions in parallel (if supported)",
473473
None, 'store_true', False),

0 commit comments

Comments
 (0)