-
Notifications
You must be signed in to change notification settings - Fork 310
Make CmdCp easier to use
#3549
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
base: develop
Are you sure you want to change the base?
Make CmdCp easier to use
#3549
Conversation
bartoldeman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I've always found the syntax for CmdCp a little odd as well.
Another confusing bit is that %(source)s refers to the original unpatched source (i.e. it takes files from the source directory, not the unpacked archive), if you apply patches they are ignored. I found that out the hard way with
https://github.com/ComputeCanada/easybuild-easyconfigs/blob/computecanada-main/easybuild/easyconfigs/s/slurm-completion/slurm-completion-23.02.7.eb
|
The problem is the default for
Currently it is the file stem (name w/o extension) of the source, so not sure how it could refer to the "unpatched source". Maybe that has changed? Or I misunderstand the issue. |
|
@Flamefire I changed to target branch in this PR from |
e493793 to
1898bbc
Compare
The name suggest running a command and copy files. However the commands need to be specified as a regex-map list which might be executed for every source instead of once. Often a workflow might be just `./custom_configure && ./custom_build.sh` which is not easy to map to this. Instead allow non-tuples which are considered as commands to be run. When mixing tuples and non-tuples the plain commands are run last.
1898bbc to
d04d2f2
Compare
The name suggest running a command and copy files. However the commands need to be specified as a regex-map list which might be executed for every source instead of once. Often a workflow might be just
./custom_configure && ./custom_build.shwhich is not easy to map to this.Instead allow non-tuples which are considered as commands to be run. When mixing tuples and non-tuples the plain commands are run last.
This was always a concern of mine that a workflow consisting of running only a command that involves some custom install procedure was less obvious than it might be. It came up recently where an EC uses
MakeCprequiringparallel = Falseas it replaces themakecmd by a single command. In that case it is./configure --optionsand./coconutwhich isn't easily applicable usingCmdCpWith this change it can be:
I'd say this is easier to read and understand than:
Also error reporting would be more focused, i.e. either "./configure failed" or "./coconut failed"
I can port a couple easyconfigs to the new syntax in a PR to the easyconfig repo for test reports and usage examples.