GNU bug report logs - #52269
[core-updates-frozen] sitecustomize.py does not honor .pth files

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sat, 4 Dec 2021 03:01:02 UTC

Severity: important

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 52269 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 52269 <at> debbugs.gnu.org
Subject: Re: bug#52269: [core-updates-frozen] sitecustomize.py does not honor
 .pth files
Date: Thu, 16 Dec 2021 10:48:55 +0100
Hi Maxim,

> You can test it by placing the new sitecustomize.py file in the current
> directory, and then:
that works, thanks!

> I agree that after it's un-bundled it shouldn't be necessary anymore, but
> let's keep this change for core-updates along work on the 517
> python-build-system (I'll try having a look to it after the next release
> it out -- ping me otherwise).
Sure.

> +    # Move the entries that were appended to sys.path in front of
> +    # Python's own site-packages directory.  This enables Guix
> +    # packages to override Python's bundled packages, such as 'pip'.
> +    python_site_index = sys.path.index(python_site)
> +    new_site_start_index = sys.path.index(matching_sites[0])
One more nitpick: list.index() will raise a ValueError if the requested
value does not exist. I believe setting GUIX_PYTHONPATH=/nonexistent
will trigger this.

Cheers,
Lars





This bug report was last modified 3 years and 213 days ago.

Previous Next


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