Skip to content

Commit c5c7abc

Browse files
committed
add an EB version check for the entire hooks file
1 parent 98b9f90 commit c5c7abc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

eb_hooks.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@
5050

5151
STACK_REPROD_SUBDIR = 'reprod'
5252

53+
# The post_easyblock_hook was introduced in EB 5.1.1
54+
MIN_EASYBUILD_VERSION_REQUIRED = '5.1.1'
55+
if EASYBUILD_VERSION < MIN_EASYBUILD_VERSION_REQUIRED:
56+
raise EasyBuildError(
57+
f"This hooks file requires at least EasyBuild version {MIN_EASYBUILD_VERSION_REQUIRED}, you are using {EASYBUILD_VERSION}."
58+
)
59+
60+
5361
def is_gcccore_1220_based(**kwargs):
5462
# ecname, ecversion, tcname, tcversion):
5563
"""

0 commit comments

Comments
 (0)