Skip to content

Commit 44e21b3

Browse files
committed
strip leading local/ from pylibdir when found
1 parent 30f0b6c commit 44e21b3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

easybuild/easyblocks/generic/pythonpackage.py

+9
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,15 @@ def det_pylibdir(plat_specific=False, python_cmd=None):
207207
cmd, prefix, out, ec)
208208

209209
pylibdir = txt[len(prefix):]
210+
211+
# Ubuntu 24.04: the pylibdir has a leading local/, which causes issues later
212+
# e.g. when symlinking <installdir>/local/* to <installdir>/*
213+
# we can safely strip this to get a working installation
214+
local = 'local/'
215+
if pylibdir.startswith(local):
216+
log.info("Removing leading /local from determined pylibdir: %s" % pylibdir)
217+
pylibdir = pylibdir[len(local):]
218+
210219
log.debug("Determined pylibdir using '%s': %s", cmd, pylibdir)
211220
return pylibdir
212221

0 commit comments

Comments
 (0)