Skip to content

adding the gcc buildenv easyblock#4136

Open
agimenog wants to merge 2 commits into
easybuilders:developfrom
agimenog:gccbuildenv
Open

adding the gcc buildenv easyblock#4136
agimenog wants to merge 2 commits into
easybuilders:developfrom
agimenog:gccbuildenv

Conversation

@agimenog

Copy link
Copy Markdown

Regarding this ticket: https://gitlab.com/eessi/support/-/work_items/213

Hi @ocaisa, reopening it with the modifications on the gcc.py file

# Make sure wrappers are readable/executable by everyone
adjust_permissions(
self.rpath_wrappers_dir,
stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

continuation line missing indentation or outdented

apply_regex_substitutions(wrapper_files, [(r'^PYTHON_EXE=.*$', f'PYTHON_EXE={py_exe}')], backup=False)
# Make sure wrappers are readable/executable by everyone
adjust_permissions(
self.rpath_wrappers_dir,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

continuation line missing indentation or outdented

# replace path to Python executable with python_executable 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=.*$', f'PYTHON_EXE={py_exe}')], backup=False)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (130 > 120 characters)

if py_exe is not None:
if not isinstance(py_exe, str) or not py_exe:
raise EasyBuildError(f"python_executable should be None or non-empty string, got {py_exe}")
wrapper_files = list(filter(os.path.isfile, glob.glob(os.path.join(rpath_wrappers_path, '*', '*'))))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (128 > 120 characters)

@ocaisa ocaisa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This also requires additional sanity checks.

wrappers_dir = os.path.join(self.rpath_wrappers_dir, RPATH_WRAPPERS_SUBDIR)
if os.path.exists(wrappers_dir):
self.rpath_wrappers_dir = os.path.join(self.installdir, 'bin')
rpath_wrappers_path = os.path.join(self.rpath_wrappers_dir, RPATH_WRAPPERS_SUBDIR)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is (I think) installing the wrappers for the toolchain used, not the rpath wrappers for the GCC that was just installed.

Comment on lines +1012 to +1013
py_exe = None # test to use the python from EB
if py_exe is not None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't follow this, this conditions is never not None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you use the framework function to create the wrappers, you would not need this anyway, the code below is part of that function

Comment on lines +1259 to +1265
wrappers_dir = os.path.join(self.rpath_wrappers_dir, RPATH_WRAPPERS_SUBDIR)
if os.path.exists(wrappers_dir):
self.module_load_environment.PATH = [
os.path.join(wrappers_dir, d)
for d in os.listdir(wrappers_dir)
if os.path.isdir(os.path.join(wrappers_dir, d))
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The wrappers should only be exposed conditionally in the module file: an EasyBuild session should ignore them and create new ones, a user sessions should use them

@boegel boegel added this to the 5.x milestone Jun 16, 2026
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.

3 participants