add fix_shebang to install_step of PythonPackage easyblock so that we can fix shebangs when installing extensions#2680
Conversation
…nstalling extensions
|
The idea is being able to add something like this in an or in order to be able to install those with |
| self.install_cmd_output += out | ||
|
|
||
| # fix shebangs if specified | ||
| self.fix_shebang() |
There was a problem hiding this comment.
Won't this pick up a shebang list from the non-extension part of the easyconfig?
That may be a bad thing.
There was a problem hiding this comment.
Possibly. Do you have a suggestion on how to avoid that ?
There was a problem hiding this comment.
In reality, I always found it weird that extensions pick up anything from the non-extension part... I've been bitten by it more than once using configopts and other parameters. In that sense, the shebang part is no different than other parameters. If there's a change to do in that regards, it should encompass much more than the shebang.
There was a problem hiding this comment.
@boegel you should know the answer, does fix_shebang here pick up things from the non-extension part?
There was a problem hiding this comment.
Yes, if fix_python_shebang_for (or another fix_*_shebang_for) is set for the "parent", then it will be picked up for all extensions as well.
All easyconfig parameters set for the parent are inherited by each extension, which is important in some cases (like toolchain for example). There are some exceptions though, see https://github.com/easybuilders/easybuild-framework/blob/95bae20337781a06defe467faf487a122aae8512/easybuild/framework/extension.py#L108
Changing this now (for EasyBuild v5.0) is worth considering.
There may be some fallout, but that can be handled via exts_default_options...
@mboisson If you would like to see this changed, please open a framework issue on this, so we can tag it with the 5.0 milestone.
There was a problem hiding this comment.
I don't really care whether extensions pick up parameters from the parent recipe, but I do know we need to be able to fix shebangs of extensions. This change is in fact already merged in our fork.
My point is rather that picking up things from the parent recipe has nothing to do with this PR. This PR is entirely coherent with what is currently happening with other parameters.
There was a problem hiding this comment.
Yeah, I agree.
And even if fix_*_shebang is being picked up from the parent once this change is merged, it should still be OK. Worst case, the shebangs get fixed...
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 6 out of 6 (6 easyconfigs in total) |
…nstalling extensions