GNU bug report logs - #68241
[PATCH] gnu: python: Fix sitecustomize.py

Previous Next

Package: guix-patches;

Reported by: Konrad Hinsen <konrad.hinsen <at> fastmail.net>

Date: Thu, 4 Jan 2024 12:45:02 UTC

Severity: normal

Tags: patch

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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Subject: bug#68241: closed (Re: [bug#68241] [PATCH] gnu: python: Fix
 sitecustomize.py)
Date: Sun, 21 Jan 2024 18:30:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#68241: [PATCH] gnu: python: Fix sitecustomize.py

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 68241 <at> debbugs.gnu.org.

-- 
68241: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68241
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: Ludovic Courtès <ludovic.courtes <at> inria.fr>,
 Josselin Poiret <dev <at> jpoiret.xyz>, 68241-done <at> debbugs.gnu.org
Subject: Re: [bug#68241] [PATCH] gnu: python: Fix sitecustomize.py
Date: Sun, 21 Jan 2024 13:29:20 -0500
Hi Konrad,

Konrad Hinsen <konrad.hinsen <at> fastmail.net> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>>> My patch fixes the error message. The Python example that Marek gave
>>> already works fine in today's Guix, so it was probably fixed by
>>> something else as a side effect.
>>
>> Oh?  And you tested using the exact same reproducer, using a relocatable
>> pack?
>
> Yes, I tested it in a Singularity container.

Great, it's now on core-updates.

-- 
Thanks,
Maxim

[Message part 3 (message/rfc822, inline)]
From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: python: Fix sitecustomize.py
Date: Thu, 04 Jan 2024 13:44:19 +0100
* gnu/packages/aux-files/python/sitecustomize.py: normalize sys.prefix
  to deal with situations where it contains "../"

This happens in particular when running Python from a Singularity image
created by Guix. See https://issues.guix.gnu.org/53258.

Change-Id: Ibfe13d7c2a14beaa199f599e64bc0b7bfb500fe8
---
 gnu/packages/aux-files/python/sitecustomize.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/aux-files/python/sitecustomize.py b/gnu/packages/aux-files/python/sitecustomize.py
index e2348e0356..82ea91104d 100644
--- a/gnu/packages/aux-files/python/sitecustomize.py
+++ b/gnu/packages/aux-files/python/sitecustomize.py
@@ -37,7 +37,7 @@ import sys
 major_minor = '{}.{}'.format(*sys.version_info)
 site_packages_prefix = os.path.join(
     'lib', 'python' + major_minor, 'site-packages')
-python_site = os.path.join(sys.prefix, site_packages_prefix)
+python_site = os.path.normpath(os.path.join(sys.prefix, site_packages_prefix))
 
 try:
     all_sites_raw = os.environ['GUIX_PYTHONPATH'].split(os.path.pathsep)

base-commit: 7b0863f07a113caef26fea13909bd97d250b629e
-- 
2.41.0




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

Previous Next


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