change buildenv easyblock: use python3 as default path to Python executable in RPATH wrapper scripts#3910
Conversation
…buildenv easyblock
|
@ocaisa Looks OK to me, but I would like to hear some thoughts on this from you... |
| wrapper_files = list(filter(os.path.isfile, glob.glob(os.path.join(rpath_wrappers_path, '*', '*')))) | ||
| # replace path to Python executable with python3 in the wrappers, | ||
| # as this is the executable that runs EasyBuild and may be unavailable when using the buildenv wrappers. | ||
| apply_regex_substitutions(wrapper_files, [(r'^PYTHON_EXE=.*$', 'PYTHON_EXE=python3')], backup=False) |
There was a problem hiding this comment.
Sorry to be a pain here, but python3 is also not guaranteed to exist. Can we add an easyblock extra_options to decide when to do this? A None value would mean don't do it, a True value would mean use the default python3, a string value would mean use a specific value (which may for example include a full path). This would give people the power (via hooks) to decide what is best for them.
There was a problem hiding this comment.
sure, i can add that. what cases do you have in mind where python3 does not exist?
There was a problem hiding this comment.
done in c59ba15
(it doesn't support True as an option as i think it's unnecessary and confusing)
There was a problem hiding this comment.
sure, i can add that. what cases do you have in mind where
python3does not exist?
I have to exercise my imagination to think of one...but if you build in a container and have a totally minimal runtime OS it would be possible, a fix in that scenario would just be to point it to one of the Python in the EasyBuild stack.
There was a problem hiding this comment.
(it doesn't support
Trueas an option as i think it's unnecessary and confusing)
Have to agree with you there, say hello to the behaviour of runtest (but of course only when using the CMakeMake easyblock)
|
Test report by @smoors Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
buildenv easyblock: use python3 as default path to Python executable in RPATH wrapper scripts
(created using
eb --new-pr)depends on
PYTHON_EXEvariable in template for RPATH wrapper script (to easily replace name ofpythoncommand to use inbuildenveasyblock) easybuild-framework#4984