Skip to content

Commit 3fa0df7

Browse files
authored
Merge pull request #3965 from boegel/20251022155908_new_pr_python
add patch specified via `patch_ctypes_ld_library_path` to patches in constructor of Python easyblock
2 parents 3c3bde2 + fb55630 commit 3fa0df7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

easybuild/easyblocks/p/python.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ def __init__(self, *args, **kwargs):
344344
raise EasyBuildError("The ensurepip module required to install pip (requested by install_pip=True) "
345345
"is not available in Python %s", self.version)
346346

347+
self._inject_patch_ctypes_ld_library_path()
348+
347349
def _get_pip_ext_version(self):
348350
"""Return the pip version from exts_list or None"""
349351
for ext in self.cfg.get_ref('exts_list'):
@@ -352,10 +354,8 @@ def _get_pip_ext_version(self):
352354
return ext[1]
353355
return None
354356

355-
def fetch_step(self, *args, **kwargs):
357+
def _inject_patch_ctypes_ld_library_path(self):
356358
"""
357-
Custom fetch step for Python.
358-
359359
Add patch specified in patch_ctypes_ld_library_path to list of patches if
360360
EasyBuild is configured to filter $LD_LIBRARY_PATH (and is configured not to filter $LIBRARY_PATH).
361361
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):
408408
msg += "correctly."
409409
self.log.warning(msg)
410410

411-
super().fetch_step(*args, **kwargs)
412-
413411
def patch_step(self, *args, **kwargs):
414412
"""
415413
Custom patch step for Python:

0 commit comments

Comments
 (0)