Dear Mike,

On 02/05/2020 02:33, Mike Kelsey wrote:
Is there a way to specify in an EasyConfig a modification to MODULEPATH that
happens _before_ the dependencies are loaded?  I'm thinking of something
like a "modluaheader", analogous to "modluafooter", but where the content
would go at the top of the .lua file, before the generated commands.

I'm writing a Bundle module which is going to be used with a Web-launched
Jupyter Notebook, to provide my group's users with access to our internal
Python packages, utilities, and so on.

This Bundle depends on Python, IPython, and a non-EasyBuild "CDMS Release"
module (essentially, a "hand-written" .lua file with a bunch of setenv's and
path modifiers) provided by our group's software.

Interactively, we can have our group users add the path where that CDMS
Release module is located, with the |module use| command.  But of course,
the OnDemand Jupyter launcher doesn't know that, and doesn't do it.  So we
need a way for the module file itself to prepend to MODULEPATH before it
tries to load its dependents.
                                        -- Mike Kelsey
This is currently not possible through an easyconfig file.

Some work was done a while ago to give you more control the module generation (see https://github.com/easybuilders/easybuild-framework/pull/2639), but I guess in this case you only want to do this in one specific case, not always tweak the generated module file?

You can certainly do it via a post_module_hook (see https://easybuild.readthedocs.io/en/latest/Hooks.html), where you can interfere with the generated module file.


regards,

Kenneth

Reply via email to