diff --git a/easybuild/easyblocks/p/python.py b/easybuild/easyblocks/p/python.py index d0ef2d40f1f..5a1d4af0e43 100644 --- a/easybuild/easyblocks/p/python.py +++ b/easybuild/easyblocks/p/python.py @@ -366,24 +366,23 @@ def patch_step(self, *args, **kwargs): ctypes_util_py = os.path.join("Lib", "ctypes", "util.py") orig_gcc_so_name = None # Let's do this incrementally since we are going back in time - if LooseVersion(self.version) >= "3.9.1": - # From 3.9.1 to at least v3.12.4 there is only one match for this line - orig_gcc_so_name = "_get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))" - if orig_gcc_so_name: - orig_gcc_so_name_regex = r'(\s*)' + re.escape(orig_gcc_so_name) + r'(\s*)' - # _get_soname() takes the full path as an argument and uses objdump to get the SONAME field from - # the shared object file. The presence or absence of the SONAME field in the ELF header of a shared - # library is influenced by how the library is compiled and linked. For manually built libraries we - # may be lacking this field, this approach also solves that problem. - updated_gcc_so_name = ( - "_findLib_gcc(name) or _findLib_ld(name)" - ) - apply_regex_substitutions( - ctypes_util_py, - [(orig_gcc_so_name_regex, r'\1' + updated_gcc_so_name + r'\2')], - on_missing_match=ERROR - ) - + # if LooseVersion(self.version) >= "3.9.1": + # # From 3.9.1 to at least v3.12.4 there is only one match for this line + # orig_gcc_so_name = "_get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))" + # if orig_gcc_so_name: + # orig_gcc_so_name_regex = r'(\s*)' + re.escape(orig_gcc_so_name) + r'(\s*)' + # # _get_soname() takes the full path as an argument and uses objdump to get the SONAME field from + # # the shared object file. The presence or absence of the SONAME field in the ELF header of a shared + # # library is influenced by how the library is compiled and linked. For manually built libraries we + # # may be lacking this field, this approach also solves that problem. + # updated_gcc_so_name = ( + # "_findLib_gcc(name) or _findLib_ld(name)" + # ) + # apply_regex_substitutions( + # ctypes_util_py, + # [(orig_gcc_so_name_regex, r'\1' + updated_gcc_so_name + r'\2')], + # on_missing_match=ERROR + # ) # if we're installing Python with an alternate sysroot, # we need to patch setup.py which includes hardcoded paths like /usr/include and /lib64; # this fixes problems like not being able to build the _ssl module ("Could not build the ssl module")