GNU bug report logs - #53258
Python unable to find modules within a Singularity container created with guix pack

Previous Next

Package: guix;

Reported by: Marek Felšöci <marek <at> felsoci.sk>

Date: Fri, 14 Jan 2022 16:08:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>, Marek Felšöci <marek <at> felsoci.sk>
Cc: 53258 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: bug#53258: Python unable to find modules within a Singularity container created with guix pack
Date: Sat, 05 Feb 2022 23:28:39 +0100
Hello everyone,

After the IRC investigation, it turned out the use of abspath in
Lib/site.py was in fact the culprit. Replacing all its uses with
realpath and doing `./pre-inst-env guix pack -RR python python-numpy -S
/bin=bin -S /etc=etc` did in fact resolve the issue!

I've raised the issue upstream at [1].  The fix itself is pretty simple,
but it's theoretically a breaking change, so we'll see how Python
maintainers want to move forward with it.  We could backport this fix
for the next core-updates cycle, whether or not it gets accepted
upstream, and we will also need to modify sitecustomize.py as well to
call os.path.realpath on python_site.

Best,
-- 
Josselin Poiret




This bug report was last modified 1 year and 115 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.