Skip to content

introduce PYTHON_EXE variable in template for RPATH wrapper script (to easily replace name of python command to use in buildenv easyblock)#4984

Merged
boegel merged 3 commits intoeasybuilders:developfrom
smoors:wrapper_python
Sep 8, 2025
Merged

introduce PYTHON_EXE variable in template for RPATH wrapper script (to easily replace name of python command to use in buildenv easyblock)#4984
boegel merged 3 commits intoeasybuilders:developfrom
smoors:wrapper_python

Conversation

@smoors
Copy link
Copy Markdown
Contributor

@smoors smoors commented Aug 18, 2025

we run easybuild in a venv, causing the wrappers contain the absolute path to the python executable in the venv, and thus is unusable for our users.

EDIT:
changed this PR to use a shell variable for the python executable, which makes it easier to substitute it with python3 in the buildenv easyblock, see easybuilders/easybuild-easyblocks#3910

@boegel boegel changed the title use python from env instead of hard-coding the path for the RPATH wrappers use python3 instead of hard-coding the path to python executable path in RPATH wrapper scripts Aug 27, 2025
@boegel boegel added this to the next release (5.1.2) milestone Aug 27, 2025
boegel
boegel previously approved these changes Aug 27, 2025
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 27, 2025

I'm OK with this in principle, but I do wonder if it can lead to surprises...

Maybe we should only use python3 for the dumped RPATH wrapper scripts, and stick to using the path obtained from sys.executable during the EasyBuild session itself.

Would that make sense @smoors?

This is about the RPATH wrappers that are kept with buildenv, correct?

@smoors
Copy link
Copy Markdown
Contributor Author

smoors commented Aug 29, 2025

I'm OK with this in principle, but I do wonder if it can lead to surprises...

Maybe we should only use python3 for the dumped RPATH wrapper scripts, and stick to using the path obtained from sys.executable during the EasyBuild session itself.

Would that make sense @smoors?

This is about the RPATH wrappers that are kept with buildenv, correct?

EDIT:
yes, that's correct. i changed this PR to make substitution easier, and substitute it in the buildenv easyblock, see easybuilders/easybuild-easyblocks#3910

@smoors smoors changed the title use python3 instead of hard-coding the path to python executable path in RPATH wrapper scripts use shell variable for python executable in RPATH wrapper scripts for easier substitution Aug 29, 2025
@boegel boegel changed the title use shell variable for python executable in RPATH wrapper scripts for easier substitution introduce PYTHON_EXE variable in template for RPATH wrapper script (to easily replace name of python command to use in buildenv easyblock) Sep 3, 2025
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, this is pretty much a no-brainer now, actual change is being made in:

@boegel boegel merged commit 861b3ef into easybuilders:develop Sep 8, 2025
46 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants