Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for using custom module file template (WIP) #2639

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

boegel
Copy link
Member

@boegel boegel commented Oct 24, 2018

Adds support for specifying a custom module file template via --modules-template, as well as for dumping the default modules template:

$ eb --show-default-modules-template
$shebang$header$descr$group_check$deps$modpath$env_vars$footer

This should meet the use case of @ax3l discussed in #2624, since it allows using a custom template like:

$shebang$header$descr$group_check$deps$modpath$env_vars$footer
prepend_path("CMAKE_PREFIX_PATH", "%(installdir)s")

In some sense this is already supported via --modules-footer though, so the added benefit is limited for that particular use case, but it does provide more control over the generated module files...

(WIP since tests are missing)

@boegel boegel added this to the 3.8.0 milestone Oct 24, 2018
@boegel boegel requested a review from ocaisa October 24, 2018 20:07
@ax3l
Copy link

ax3l commented Oct 31, 2018

Thank you for the great feedback and proposed update!
I can imagine several cases where one wants to add vars such as MANPATH, additional program-specific helper vars, etc. Maybe one can parametrize the module template even on the easyblock?

As a background and comparison to spack, one could export/extend vars on a per-package basis and a general filter (all, all depending on X, etc.)

@boegel
Copy link
Member Author

boegel commented Nov 20, 2018

@ax3l So, rather than being able to provide a single fixed module file template that is used for everything, you'd like this be (potentially) be conditional, such that a different template is used in different situations?

That's way beyond what I had in mind for this... I guess this can be a first step.

This could be extended later to support that the --modules-template value points to a Python module/script that generates a template based on the availabe inputs... Is that what you're looking for?

@boegel boegel modified the milestones: 3.8.0, 3.9.0 Nov 21, 2018
@akesandgren
Copy link
Contributor

Considering that you can do basically anything you want with the easyhooks, is this still relevant?

@boegel boegel modified the milestones: next release (3.9.1), 3.x May 14, 2019
@boegel boegel modified the milestones: 3.x, 4.x Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants