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>
This commit is contained in:
Konrad Hinsen 2024-01-04 13:44:19 +01:00 committed by Ludovic Courtès
parent be86f3de1e
commit d5e0180805
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -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)