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

allow extensions to add text to the module file #4652

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Flamefire
Copy link
Contributor

Introduce make_extension_module_extra which gets called during module
file creation for every extension similar to make_module_extra.
This ensures it will also be called for parallel extension or --module-only builds.

Fixes #4647

I'm open for a better name but make_module_extra_extensions already exists so make_module_extra_extension might be confusing.

Currently the (now deprecated) feature is only used by the numpy easyblock to add the numpy includes to $CPATH. So that easyblock needs to be updated. I'd argue that we shouldn't add the numpy includes as a regular pip install numpy doesn't do that either. So if a user updates the numpy in a virtualenv using our current approach might end up using headers from one numpy and libs/python files from another.

However I'm not sure if (and why) other software we have already relies on that. One which did will be fixed by easybuilders/easybuild-easyconfigs#21467

@Flamefire Flamefire force-pushed the module_text_from_extensions branch 2 times, most recently from 1759ad1 to 8a0b143 Compare September 23, 2024 11:40
The different options for the module footers did not have consistent
newline handling:
- modtclfooter & modluafooter did append a line break
- modules_footer (cmdline) did not

Make sure all end with a new line such that they work in combination
especially with the EasyBuild version comment moved to the bottom
Introduce `make_extension_module_extra` which gets called during module
file creation for every extension similar to `make_module_extra`.
This ensures it will also be called for parallel extension or --module-only builds.

Fixes easybuilders#4647
The extensions are required by the module creation and will be loaded if
they are not yet.
In `extensions_step` they would then be loaded again.
Avoid this by doing this earlier in `extensions_step`
This is always equal to `self.exts` as skipping is done on
`self.ext_instances`.
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.

Incomplete module for extensions
2 participants