easybuild.tools.hooks module¶
Hook support.
Authors:
- Kenneth Hoste (Ghent University)
-
easybuild.tools.hooks.find_hook(label, hooks, pre_step_hook=False, post_step_hook=False)¶ Find hook with specified label.
Parameters: - label – name of hook
- hooks – dict of defined hooks
- pre_step_hook – indicates whether hook to run is a pre-step hook
- post_step_hook – indicates whether hook to run is a post-step hook
-
easybuild.tools.hooks.load_hooks(hooks_path)¶ Load defined hooks (if any).
-
easybuild.tools.hooks.run_hook(label, hooks, pre_step_hook=False, post_step_hook=False, args=None, msg=None)¶ Run hook with specified label and return result of calling the hook or None.
Parameters: - label – name of hook
- hooks – dict of defined hooks
- pre_step_hook – indicates whether hook to run is a pre-step hook
- post_step_hook – indicates whether hook to run is a post-step hook
- args – arguments to pass to hook function
- msg – custom message that is printed when hook is called
-
easybuild.tools.hooks.verify_hooks(hooks)¶ Check whether obtained hooks only includes known hooks.