Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f750fa4
Add a patch that enable to use libraries exposed via LIBRARY_PATH or
dagonzalezfo Jun 5, 2025
98c9e64
remove eprefix definitions
dagonzalezfo Jun 6, 2025
292f388
Update custom patch adding additional function for libraries with ful…
dagonzalezfo Jul 25, 2025
115f7b0
Changed EasyConfig to use custom keywords from https://github.com/eas…
Jul 30, 2025
acc8c89
Merge pull request #1 from casparvl/use_python_ebblock_conditional_pa…
dagonzalezfo Jul 30, 2025
d6088b1
prevent none as fullpath, use a robust regex for __findLib_gcc_fullna…
dagonzalezfo Jul 30, 2025
b688107
update patch and recipe
dagonzalezfo Jul 30, 2025
bd6e616
Remove regex encoding to ensure compatibility with decoded output, fi…
dagonzalezfo Jul 31, 2025
d85a792
Add comment about stubs and update checksum
dagonzalezfo Jul 31, 2025
2804386
Enhance regex to filter stubs on gcc based library search
dagonzalezfo Aug 7, 2025
ac3dd00
Reduce to a single custom keyword
Aug 27, 2025
b9c9086
adapt to the fact that the patch_custom_ctypes is now a string, not a…
Aug 27, 2025
bd768bd
Add comment about preventing using stubs provided cuda libraries
dagonzalezfo Aug 27, 2025
aef6e53
update patch checksum
dagonzalezfo Aug 27, 2025
05a15b3
Deduplicate _findLib_gcc and _findLib_gcc_fullname functions. Also, r…
Oct 13, 2025
f7e8762
Update checksum for new patch
Oct 14, 2025
7c0df89
Update patch description. Update checksum for patch
Oct 14, 2025
31878d1
Try to apply the ctypes patch to other python versions as well
Oct 16, 2025
f6e0a75
Merge branch 'develop' into python-3.11.5-librarypath-prefix-support
casparvl Oct 16, 2025
c151fd3
Fix trailing whitespace
Oct 16, 2025
19e8321
Add missing quote
Oct 17, 2025
0d4ff60
Fix quote
Oct 17, 2025
f682e59
Update easybuild/easyconfigs/p/Python/Python-3.11.5-custom-ctypes.patch
casparvl Oct 20, 2025
d3b2d8a
Update checksums
Oct 20, 2025
b3a3a36
Merge branch 'python-3.11.5-librarypath-prefix-support' of github.com…
Oct 20, 2025
53bcda3
update test_pr_sha256_checksums to take into account checksum for pat…
boegel Oct 22, 2025
f74dbf0
Since we modify the checksums list, we need to use get_ref, since ec[…
Oct 22, 2025
575c58f
trivial tweak in comment for patch_ctypes_ld_library_path in Python e…
boegel Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['f3bcc65b1d5f1dc78675c746c98fcee823c038168fc629c5935b044d0911ad28']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.10.4.tgz': 'f3bcc65b1d5f1dc78675c746c98fcee823c038168fc629c5935b044d0911ad28'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
10 changes: 9 additions & 1 deletion easybuild/easyconfigs/p/Python/Python-3.10.4-GCCcore-11.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['f3bcc65b1d5f1dc78675c746c98fcee823c038168fc629c5935b044d0911ad28']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.10.4.tgz': 'f3bcc65b1d5f1dc78675c746c98fcee823c038168fc629c5935b044d0911ad28'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['f400c3fb394b8bef1292f6dc1292c5fadc3533039a5bc0c3e885f3e16738029a']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.10.8.tgz': 'f400c3fb394b8bef1292f6dc1292c5fadc3533039a5bc0c3e885f3e16738029a'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
10 changes: 9 additions & 1 deletion easybuild/easyconfigs/p/Python/Python-3.10.8-GCCcore-12.2.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['f400c3fb394b8bef1292f6dc1292c5fadc3533039a5bc0c3e885f3e16738029a']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.10.8.tgz': 'f400c3fb394b8bef1292f6dc1292c5fadc3533039a5bc0c3e885f3e16738029a'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.11.2.tgz': '2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
10 changes: 9 additions & 1 deletion easybuild/easyconfigs/p/Python/Python-3.11.3-GCCcore-12.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['1a79f3df32265d9e6625f1a0b31c28eb1594df911403d11f3320ee1da1b3e048']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.11.3.tgz': '1a79f3df32265d9e6625f1a0b31c28eb1594df911403d11f3320ee1da1b3e048'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
10 changes: 9 additions & 1 deletion easybuild/easyconfigs/p/Python/Python-3.11.5-GCCcore-13.2.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['a12a0a013a30b846c786c010f2c19dd36b7298d888f7c4bd1581d90ce18b5e58']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.11.5.tgz': 'a12a0a013a30b846c786c010f2c19dd36b7298d888f7c4bd1581d90ce18b5e58'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
162 changes: 162 additions & 0 deletions easybuild/easyconfigs/p/Python/Python-3.11.5-custom-ctypes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
Ctypes heavily relies on LD_LIBRARY_PATH in it's find_library, ctypes.CDLL, ctypes.cdll.LoadLibrary functions.
This patch is meant for systems where LD_LIBRARY_PATH is filtered. It will rely on LIBRARY_PATH instead.
It makes the following essential changes:
- Whereever find_library searched LD_LIBRARY_PATH, LIBRARY_PATH will be searched instead
- find_library is adapted so that it returns the full library path, not just the library name, which replaces
https://github.com/easybuilders/easybuild-easyblocks/pull/3352
- The internal function _findLib_gcc, one of the functions called by find_library to locate libraries, is adapted
so that it also works when called by full library name (e.g. libfoo.so.1) instead of the short name (foo) only
This is necessary since CDLL is typically called by full name, and needs to be able to call find_library 9see below)
- The initialization of CDLL is adapted so that it calls find_library. Then, it overwrites the name
with the full library path. This defers all the library localization issues to the (patched) find_library
Authors: Danilo Gonzalez (DoItNow group), Caspar van Leeuwen (SURF) and Alan O'cais (CECAM)
diff -Nru Python-3.11.5.orig/Lib/ctypes/__init__.py Python-3.11.5/Lib/ctypes/__init__.py
--- Python-3.11.5.orig/Lib/ctypes/__init__.py 2025-10-13 15:58:38.405564000 +0200
+++ Python-3.11.5/Lib/ctypes/__init__.py 2025-10-13 16:01:08.717507706 +0200
@@ -14,6 +14,9 @@

from struct import calcsize as _calcsize

+# Add util to use find_library capabilities
+from ctypes import util
+
if __version__ != _ctypes_version:
raise Exception("Version number mismatch", __version__, _ctypes_version)

@@ -349,6 +352,12 @@
flags |= _FUNCFLAG_USE_ERRNO
if use_last_error:
flags |= _FUNCFLAG_USE_LASTERROR
+ # define CDLL instance name as fullpath
+ if _os.name == "posix":
+ if name:
+ fullpath = util.find_library(name)
+ if fullpath is not None:
+ self._name = fullpath
if _sys.platform.startswith("aix"):
"""When the name contains ".a(" and ends with ")",
e.g., "libFOO.a(libFOO.so)" - this is taken to be an
diff -Nru Python-3.11.5.orig/Lib/ctypes/util.py Python-3.11.5/Lib/ctypes/util.py
--- Python-3.11.5.orig/Lib/ctypes/util.py 2025-10-13 15:58:38.306949000 +0200
+++ Python-3.11.5/Lib/ctypes/util.py 2025-10-13 17:17:07.589997890 +0200
@@ -99,12 +99,19 @@
with open(filename, 'br') as thefile:
return thefile.read(4) == elf_header

- def _findLib_gcc(name):
+ def _findLib_gcc(name, name_is_fullname=False):
# Run GCC's linker with the -t (aka --trace) option and examine the
# library name it prints out. The GCC command will fail because we
# haven't supplied a proper program with main(), but that does not
# matter.
- expr = os.fsencode(r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name))
+ # If the name is a full library name (e.g. libfoo.so), this function calls gcc with -l:<name> instead of
+ # -l<name> and uses a slightly more strict regular expression to avoid matching the error
+ # '/path/to/ld: cannot find -l:libfoo.so: No such file or directory'
+ # since we only want a regex match if the library exists
+ if name_is_fullname:
+ expr = os.fsencode(r'^[^\(\)\s]*%s[^\(\)\s]*' % re.escape(name))
+ else:
+ expr = os.fsencode(r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name))

c_compiler = shutil.which('gcc')
if not c_compiler:
@@ -115,7 +122,10 @@

temp = tempfile.NamedTemporaryFile()
try:
- args = [c_compiler, '-Wl,-t', '-o', temp.name, '-l' + name]
+ if name_is_fullname:
+ args = [c_compiler, '-Wl,-t', '-o', temp.name, '-l:' + name]
+ else:
+ args = [c_compiler, '-Wl,-t', '-o', temp.name, '-l' + name]

env = dict(os.environ)
env['LC_ALL'] = 'C'
@@ -136,7 +146,12 @@
# Raised if the file was already removed, which is the normal
# behaviour of GCC if linking fails
pass
- res = re.findall(expr, trace)
+ # If name_is_fullname, the regex in expr starts wity ^.
+ # Use re.MULTILINE, to make surethat ^ matches the start of EACH line in trace
+ if name_is_fullname:
+ res = re.findall(expr, trace, re.MULTILINE)
+ else:
+ res = re.findall(expr, trace)
if not res:
return None

@@ -146,8 +161,11 @@
# shared objects. See bpo-41976 for more details
if not _is_elf(file):
continue
- return os.fsdecode(file)
-
+ file = os.fsdecode(file)
+ # Avoid returning CUDA stubs libraries, as those are not intended for runtime use
+ if re.search(r'cuda.*stubs', file, re.IGNORECASE):
+ continue
+ return file

if sys.platform == "sunos5":
# use /usr/ccs/bin/dump on solaris
@@ -283,7 +301,8 @@
abi_type = mach_map.get(machine, 'libc6')

# XXX assuming GLIBC's ldconfig (with option -p)
- regex = r'\s+(lib%s\.[^\s]+)\s+\(%s'
+ # Regular expresion that captures complete line of ldconfig -p output that matches with library name.
+ regex = r'\s+(lib%s\.[^\s]+)\s+\(%s\)\s+=>\s+(\S+)'
Comment thread
casparvl marked this conversation as resolved.
regex = os.fsencode(regex % (re.escape(name), abi_type))
try:
with subprocess.Popen(['/sbin/ldconfig', '-p'],
@@ -293,7 +312,8 @@
env={'LC_ALL': 'C', 'LANG': 'C'}) as p:
res = re.search(regex, p.stdout.read())
if res:
- return os.fsdecode(res.group(1))
+ # return the regex second group, that is the full path to the library
+ return os.fsdecode(res.group(2))
Comment thread
dagonzalezfo marked this conversation as resolved.
except OSError:
pass

@@ -301,10 +321,17 @@
# See issue #9998 for why this is needed
expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
cmd = ['ld', '-t']
- libpath = os.environ.get('LD_LIBRARY_PATH')
+ # use LIBRARY_PATH instead of LD_LIBRARY_PATH to use EB provided shared libraries
+ libpath = os.environ.get('LIBRARY_PATH')
Comment thread
casparvl marked this conversation as resolved.
Comment thread
dagonzalezfo marked this conversation as resolved.
if libpath:
for d in libpath.split(':'):
- cmd.extend(['-L', d])
+ # Avoid picking up CUDA stubs libraries, as those are not intended for runtime use
+ parts = d.split('/')
+ # We want to add 'd' in all cases EXCEPT if the path contains both CUDA (as partial
+ # directory name) and stubs (as full directory name). I.e. /my/bar/stubs and /my/cudafoo
+ # will be added to cmd, but /my/cudafoo/bar/stubs won't be
+ if not (any('cuda' in p.lower() for p in parts) and 'stubs' in parts):
+ cmd.extend(['-L', d])
cmd.extend(['-o', os.devnull, '-l%s' % name])
result = None
try:
@@ -325,9 +352,15 @@
return result

def find_library(name):
- # See issue #9998
- return _findSoname_ldconfig(name) or \
- _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))
+ # Redefine find_library function, it will return the provided name if
+ # path exist, else it will use the set of functions to find the full library path.
+ # it will return the one that has a match.
+ if os.path.isabs(name) and os.path.exists(name):
+ return name
+ else:
+ return _findSoname_ldconfig(name) or \
Comment thread
casparvl marked this conversation as resolved.
+ _findLib_gcc(name) or _findLib_ld(name) or \
+ _findLib_gcc(name, name_is_fullname=True)

################################################################
# test code
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ toolchainopts = {'pic': True}
source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
patches = ['Python-3.12.3_avoid-tkinter-build.patch']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.12.3.tgz': 'a6b9459f45a6ebbbc1af44f5762623fa355a0c87208ed417628b379d762dddb0'},
{'Python-3.12.3_avoid-tkinter-build.patch': '34fa44ca67fc08d41c58db2e289317f12f32777a352a982dca2e63459fc089e3'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]

patches = [
'Python-3.12.3_avoid-tkinter-build.patch',
'Python-3.13.1_runshared-ld-preload.patch',
]

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.13.1.tgz': '1513925a9f255ef0793dbf2f78bb4533c9f184bdd0ad19763fd7f47a400a7c55'},
{'Python-3.12.3_avoid-tkinter-build.patch': '34fa44ca67fc08d41c58db2e289317f12f32777a352a982dca2e63459fc089e3'},
{'Python-3.13.1_runshared-ld-preload.patch': 'ca9ec56c71aafa881e7ddf6fba23fbecc016be48c2d912e5ccd92962ddd38edf'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'},
]

builddependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['e0fbd5b6e1ee242524430dee3c91baf4cbbaba4a72dd1674b90fda87b713c7ab']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.9.5.tgz': 'e0fbd5b6e1ee242524430dee3c91baf4cbbaba4a72dd1674b90fda87b713c7ab'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
10 changes: 9 additions & 1 deletion easybuild/easyconfigs/p/Python/Python-3.9.5-GCCcore-10.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['e0fbd5b6e1ee242524430dee3c91baf4cbbaba4a72dd1674b90fda87b713c7ab']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.9.5.tgz': 'e0fbd5b6e1ee242524430dee3c91baf4cbbaba4a72dd1674b90fda87b713c7ab'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['d0a35182e19e416fc8eae25a3dcd4d02d4997333e4ad1f2eee6010aadc3fe866']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.9.6.tgz': 'd0a35182e19e416fc8eae25a3dcd4d02d4997333e4ad1f2eee6010aadc3fe866'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
10 changes: 9 additions & 1 deletion easybuild/easyconfigs/p/Python/Python-3.9.6-GCCcore-11.2.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ toolchainopts = {'pic': True}

source_urls = ['https://www.python.org/ftp/%(namelower)s/%(version)s/']
sources = [SOURCE_TGZ]
checksums = ['d0a35182e19e416fc8eae25a3dcd4d02d4997333e4ad1f2eee6010aadc3fe866']

# Like patches, but these will only be applied if EasyBuild is configured to filter $LD_LIBRARY_PATH
# In that scenario, ctypes needs to be patched since it heavily relies on $LD_LIBRARY_PATH to find libraries
patch_ctypes_ld_library_path = 'Python-3.11.5-custom-ctypes.patch'

checksums = [
{'Python-3.9.6.tgz': 'd0a35182e19e416fc8eae25a3dcd4d02d4997333e4ad1f2eee6010aadc3fe866'},
{'Python-3.11.5-custom-ctypes.patch': 'b29c22f47587460149e05296ff09b29bf790a83e2b3b13fb2f42f5f236ad8ea7'}
]

builddependencies = [
('UnZip', '6.0'),
Expand Down
Loading