From fb55630bd5beb3a7600b962088e745cc6d026ca4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 22 Oct 2025 15:59:08 +0200 Subject: [PATCH] add patch specified via patch_ctypes_ld_library_path to patches in constructor of Python easyblock --- easybuild/easyblocks/p/python.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index b18f930e166..6d3dccf4241 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -344,6 +344,8 @@ def __init__(self, *args, **kwargs): raise EasyBuildError("The ensurepip module required to install pip (requested by install_pip=True) " "is not available in Python %s", self.version) + self._inject_patch_ctypes_ld_library_path() + def _get_pip_ext_version(self): """Return the pip version from exts_list or None""" for ext in self.cfg.get_ref('exts_list'): @@ -352,10 +354,8 @@ def _get_pip_ext_version(self): return ext[1] return None - def fetch_step(self, *args, **kwargs): + def _inject_patch_ctypes_ld_library_path(self): """ - Custom fetch step for Python. - Add patch specified in patch_ctypes_ld_library_path to list of patches if EasyBuild is configured to filter $LD_LIBRARY_PATH (and is configured not to filter $LIBRARY_PATH). This needs to be done in (or before) the fetch step to ensure that those patches are also fetched. @@ -408,8 +408,6 @@ def fetch_step(self, *args, **kwargs): msg += "correctly." self.log.warning(msg) - super().fetch_step(*args, **kwargs) - def patch_step(self, *args, **kwargs): """ Custom patch step for Python: