all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Konrad Hinsen <konrad.hinsen@fastmail.net>
To: 68241@debbugs.gnu.org
Subject: [bug#68241] [PATCH] gnu: python: Fix sitecustomize.py
Date: Thu, 04 Jan 2024 13:44:19 +0100	[thread overview]
Message-ID: <m1sf3djmjg.fsf@fastmail.net> (raw)

* 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





             reply	other threads:[~2024-01-04 12:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04 12:44 Konrad Hinsen [this message]
2024-01-06  9:32 ` [bug#68241] [PATCH] gnu: python: Fix sitecustomize.py 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1sf3djmjg.fsf@fastmail.net \
    --to=konrad.hinsen@fastmail.net \
    --cc=68241@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.