Hi Jack,
On 02/09/16 03:24, Jack Perdue wrote:
Howdy Kenneth/all,
Will triple quotes still be available for description and *opts
in 3.0? Is that inherit to Python or something EB goes out
of the way to support.
That's inherit to Python, so that'll definitely remain support for
easyconfigs in the current format (which is basically straight up Python).
Being not so good at Python (or Git), I've kinda come
up with a style that is pleasing to the eye, makes pep8
happy, and seems to work (example attached).
I'm personally not a big fan of this, especially for the
backslashes/newlines that need to be there in the right places for this
to work...
But let's not make this a bikeshedding discussion, I can see why someone
would prefer this of the style we try to maintain in the central repo. :-)
And I don't have to write a stupid easyblock for it
(I really do hate a lot of them).
I've had this discussion with other people as well.
Easyblocks are a good way of solving a 'problem' (like some parts of an
easyconfig file depending on the toolchain) once, and then forgetting
about it.
But of course, they require that you're somewhat familiar with Python,
and that you know how to talk to the EasyBuild framework API a bit.
For description, I use the 3x" and a new line
followed with one space on each line (less than 80 chars)
until the closing 3x"
For preconfigopts/configopt/prebuildopts/etc. it looks
so much cleaner than a bunch of '&&' or ';'. Of course,
remembering where the backslashes are need is important.
patches vs. sed is for another discussion...
We should have support for what I call "runtime patching" too next to
patch files, cfr.
https://github.com/hpcugent/easybuild-framework/issues/1400, since that
would avoid having to update trivial patches for new software versions...
I use four spaces on those lines to adhere to something
Pythonesque and it doesn't matter so much (using four
spaces in the "description" makes it look weird.... using
it on a command/configure/make line, eh, who cares).
Whatever rocks your boat. ;-)
I guess it may also help with making the commands in (debug) logs easier
to read for humans.
Anyway, I think 3.0 needs to be able to support something
cleanish like this... some EasyBuild's easyconfigs are downright
ugly. :) (and make pep8 very unhappy)
Don't worry, the current .eb format is going to remain supported in
EasyBuild v3 and probably way beyond that.
Although there are ongoing efforts for an new YAML-based format, that
doesn't mean we will drop the existing format like a stone, that would
go directly against one of EasyBuild's goals of making it easy to
reproduce installations.
regards,
Kenneth