unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68241] [PATCH] gnu: python: Fix sitecustomize.py
@ 2024-01-04 12:44 Konrad Hinsen
  2024-01-06  9:32 ` Konrad Hinsen
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Konrad Hinsen @ 2024-01-04 12:44 UTC (permalink / raw)
  To: 68241

* 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





^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-22  7:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04 12:44 [bug#68241] [PATCH] gnu: python: Fix sitecustomize.py Konrad Hinsen
2024-01-06  9:32 ` Konrad Hinsen
2024-01-06  9:37 ` Konrad Hinsen
2024-01-08  8:57 ` Ludovic Courtès
2024-01-08  9:14   ` Konrad Hinsen
2024-01-21  4:22     ` Maxim Cournoyer
2024-01-21 11:11       ` Konrad Hinsen
2024-01-21 18:29         ` bug#68241: " Maxim Cournoyer
2024-01-22  7:15           ` [bug#68241] " Konrad Hinsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).