guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

59/75: gnu: python: Normalize sys.prefix in sitecustomize.py.


From: guix-commits
Subject: 59/75: gnu: python: Normalize sys.prefix in sitecustomize.py.
Date: Sun, 21 Jan 2024 13:21:49 -0500 (EST)

apteryx pushed a commit to branch core-updates
in repository guix.

commit d8875d76555faf1a11f6838312bfe4b7f6121d2c
Author: Konrad Hinsen <konrad.hinsen@fastmail.net>
AuthorDate: Thu Jan 4 13:44:19 2024 +0100

    gnu: python: Normalize sys.prefix in sitecustomize.py.
    
    * gnu/packages/aux-files/python/sitecustomize.py: normalize sys.prefix to 
deal
    with situations where it contains "../", as can happen in relocatable packs.
    
    Change-Id: Ibfe13d7c2a14beaa199f599e64bc0b7bfb500fe8
    Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]