Skip to content

Commit

Permalink
Merge pull request #4727 from boegel/resolve_template_extensio_checksums
Browse files Browse the repository at this point in the history
resolve template values when getting checksums for extensions
  • Loading branch information
branfosj authored Dec 21, 2024
2 parents 2281945 + 2755f65 commit c999fe4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion easybuild/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def collect_exts_file_info(self, fetch_files=True, verify_checksums=True):
template_values.update(template_constant_dict(ext_src))

source_urls = resolve_template(ext_options.get('source_urls', []), template_values)
checksums = ext_options.get('checksums', [])
checksums = resolve_template(ext_options.get('checksums', []), template_values)

download_instructions = resolve_template(ext_options.get('download_instructions'), template_values)

Expand Down
10 changes: 7 additions & 3 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,11 @@ def test_exts_list(self):
"checksums": [
# SHA256 checksum for source (gzip-1.4.eb)
"6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45",
# SHA256 checksum for 'patch' (toy-0.0.eb)
"177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad",
# SHA256 checksum for 'patch' (toy-0.0.eb);
# using dict value with key that has a template value,
# to make sure that works as expected...
{"toy-0.%(version_minor)s.eb":
"177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad"},
],
}),
# Can use templates in name and version
Expand All @@ -519,7 +522,8 @@ def test_exts_list(self):
self.assertEqual(exts_sources[1]['version'], '2.0')
self.assertEqual(exts_sources[1]['options'], {
'checksums': ['6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45',
'177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'],
{'toy-0.%(version_minor)s.eb':
'177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'}],
'patches': [('toy-0.0.eb', '.')],
'source_tmpl': 'gzip-1.4.eb',
'source_urls': [('http://example.com', 'suffix')],
Expand Down

0 comments on commit c999fe4

Please sign in to comment.