-
Notifications
You must be signed in to change notification settings - Fork 202
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 renaming sources on download #2223
Conversation
@wpoely86 thoughts on this? |
looks interesting and useful. "->" is a good separator, rarely found in actual file names, ":" is far more common. But wouldn't a list be even better, something like
Or some other construct instead of putting all of it into a string |
@akesandgren Well, the problem is that we already support specifying a source together with an unpack command, see for example https://github.com/hpcugent/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/a/ABINIT/ABINIT-7.2.1-x86_64_linux_gnu4.5.eb#L29. We could probably detect whether the 2nd provided string is an extract command or an alternate name for the tarball (e.g. if it includes |
yes, but isn't ['a', 'b'] != ('a', 'b') in python typing? And thus distinguishable? You might need a awkward unpack command, think lapack in openblas or similar, together with renaming. |
@akesandgren Sure, a list |
I'm not sure I like the syntax but it's a great feature to have |
@wpoely86 I'm not sure I'm very fond of it myself, to be honest... I started with this to dance around the issue of already supporting Thoughts on auto-detecting whether the 2nd element specified is an extract command (based on the presence of Another option would be allowing to specify sources with a sources = [{'name': SOURCE_TAR_GZ, 'download_as': 'archive.tar.gz'}] That's a bit more verbose, but it's explicit... We can then even consider deprecating |
I like that. But it would be even smoother if one could specify
At least under a transition period. |
@akesandgren That would be the idea, but I'm inclined to deprecate the |
+1 on deprecating. As long as there is a transition period to rewrite stuff :-) +1 on chksum in that same dict. It's currently difficult to be sure which one goes where for a newbie. |
… dict; deprecate 2-tuple list/element source spec to specify custom extract command
Documentation update @ easybuilders/easybuild#345 |
Thanks for the review @akesandgren and @wpoely86! I'll go ahead and merge this in for EasyBuild v3.3.0. It does not support including checksums inside of |
This adds support for:
With this construct, the source will be downloading using
toy.tar.gz
, but saved to disk usingtoy-0.0.tar.gz
. If the file is already available astoy-0.0.tar.gz
it will be picked up andtoy.tar.gz
will not be downloaded again.I'm open to suggestions for alternate notations other than
->
, this is just one of the possibilities I went with that make it quite explicit. Another alternative would be something liketoy.tar.gz:toy-0.0.tar.gz
.fix for #455
cc @wpoely86, @pneerincx, @fgeorgatos