13
13
from easybuild .base import fancylogger
14
14
from easybuild .tools .build_log import EasyBuildError
15
15
16
+
16
17
_log = fancylogger .getLogger ('entrypoints' , fname = False )
17
18
18
19
def get_group_entrypoints (group : str ) -> set [EntryPoint ]:
@@ -39,7 +40,8 @@ def get_group_entrypoints(group: str) -> set[EntryPoint]:
39
40
HOOKS_ENTRYPOINT_MARK = "_is_easybuild_hook"
40
41
HOOKS_ENTRYPOINT_PRIORITY = "_priority"
41
42
42
- #########################################################################################3
43
+
44
+ #########################################################################################
43
45
# Easyblock entrypoints
44
46
def register_easyblock_entrypoint ():
45
47
"""Decorator to register an easyblock entrypoint."""
@@ -77,7 +79,7 @@ def validate_easyblock_entrypoints() -> list[str]:
77
79
return invalid_easyblocks
78
80
79
81
80
- def get_easyblock_entrypoints (name = None ) -> dict :
82
+ def get_easyblock_entrypoints (name = None ) -> dict :
81
83
"""Get all easyblock entrypoints.
82
84
83
85
Returns:
@@ -97,9 +99,6 @@ def get_easyblock_entrypoints(name = None) -> dict:
97
99
'loc' : mod .__file__ ,
98
100
}
99
101
easyblocks [f'{ ep .module } ' ] = ptr
100
- # print('--' * 80)
101
- # print(easyblocks)
102
- # print('--' * 80)
103
102
if name is not None :
104
103
for key , value in easyblocks .items ():
105
104
if value ['class' ] == name :
@@ -110,6 +109,7 @@ def get_easyblock_entrypoints(name = None) -> dict:
110
109
111
110
return easyblocks
112
111
112
+
113
113
#########################################################################################
114
114
# Hooks entrypoints
115
115
def register_entrypoint_hooks (step , pre_step = False , post_step = False , priority = 0 ):
@@ -183,9 +183,7 @@ def validate_entrypoint_hooks(known_hooks: list[str], pre_prefix: str, post_pref
183
183
def find_entrypoint_hooks (label , pre_step_hook = False , post_step_hook = False ) -> list [Callable ]:
184
184
"""Get all hooks defined in entry points."""
185
185
hooks = []
186
- # print(f"--- Searching for entry point hooks with label: {label}, pre_step_hook: {pre_step_hook}, post_step_hook: {post_step_hook}")
187
186
for ep in get_group_entrypoints (HOOKS_ENTRYPOINT ):
188
- # print(f"--- Processing entry point: {ep.name}")
189
187
try :
190
188
hook = ep .load ()
191
189
except Exception as e :
@@ -202,6 +200,7 @@ def find_entrypoint_hooks(label, pre_step_hook=False, post_step_hook=False) -> l
202
200
203
201
return hooks
204
202
203
+
205
204
#########################################################################################
206
205
# Toolchain entrypoints
207
206
def register_toolchain_entrypoint (prepend = False ):
@@ -228,8 +227,6 @@ def get_toolchain_entrypoints() -> set[EntryPoint]:
228
227
_log .error (f"Error loading toolchain entry point { ep .name } : { e } " )
229
228
raise EasyBuildError (f"Error loading toolchain entry point { ep .name } : { e } " )
230
229
toolchains .append (tc )
231
- # print(f"Found {len(toolchains)} toolchain entry points")
232
- # print(f"Toolchain entry points: {toolchains}")
233
230
return toolchains
234
231
235
232
0 commit comments