From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Athena Martin <secure@alm.website>
Cc: jgart@dismail.de, "Ludovic Courtès" <ludo@gnu.org>,
lars@6xq.net, 64309@debbugs.gnu.org
Subject: bug#64309: Python dlopen()s musl libc
Date: Tue, 11 Jul 2023 10:34:06 +0200 [thread overview]
Message-ID: <87jzv6979d.fsf@jpoiret.xyz> (raw)
In-Reply-To: <20230710154734.2b71b56b@spock.hosts.alm.website>
[-- Attachment #1: Type: text/plain, Size: 2052 bytes --]
Hi Athena,
Athena Martin <secure@alm.website> writes:
> $ guix shell python-neovim-remote python -- python3
>>>> sys.path
> ['', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python310.zip', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/lib-dynload', '/home/alm/.local/lib/python3.10/site-packages', '/gnu/store/ll75wx2cvm1dbbxjr095lcs1653q2zz1-profile/lib/python3.10/site-packages', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages']
>
> (It's not from the environment:)
>
> $ guix shell python-neovim-remote python --pure -- python3
>>>> sys.path
> ['', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python310.zip', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/lib-dynload', '/home/alm/.local/lib/python3.10/site-packages', '/gnu/store/ll75wx2cvm1dbbxjr095lcs1653q2zz1-profile/lib/python3.10/site-packages', '/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages']
>>>> os.environ
> environ({'HOME': '/home/alm', 'LOGNAME': 'alm', 'PAGER': 'less', 'DISPLAY': ':0', 'USER': 'alm', 'TERM': 'xterm-256color', 'PATH': '/gnu/store/ll75wx2cvm1dbbxjr095lcs1653q2zz1-profile/bin', 'GUIX_PYTHONPATH': '/gnu/store/ll75wx2cvm1dbbxjr095lcs1653q2zz1-profile/lib/python3.10/site-packages', 'GUIX_ENVIRONMENT': '/gnu/store/ll75wx2cvm1dbbxjr095lcs1653q2zz1-profile'})
So, looks like the default Python behavior is to load the usercustomize
after the sitecustomize [1], which leads to exactly the behavior you're
experiencing. I don't know what we should do here, maybe pass `-s` to
the shebang line of Python to disable loading the usercustomize? That
would probably be a world-rebuild though. CC'ing the Python team to see
what they think.
[1] https://docs.python.org/3/library/site.html
Best,
--
Josselin Poiret
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]
next prev parent reply other threads:[~2023-07-11 8:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 0:42 bug#64309: Python dlopen()s musl libc Athena Martin via Bug reports for GNU Guix
2023-07-07 14:00 ` Ludovic Courtès
2023-07-08 20:16 ` Athena Martin via Bug reports for GNU Guix
2023-07-09 8:35 ` Josselin Poiret via Bug reports for GNU Guix
2023-07-09 20:22 ` Athena Martin via Bug reports for GNU Guix
2023-07-10 7:13 ` Josselin Poiret via Bug reports for GNU Guix
2023-07-10 19:47 ` Athena Martin via Bug reports for GNU Guix
2023-07-11 8:34 ` Josselin Poiret via Bug reports for GNU Guix [this message]
2023-07-11 12:43 ` Lars-Dominik Braun
2023-07-12 8:50 ` Josselin Poiret via Bug reports for GNU Guix
2023-07-16 8:35 ` Lars-Dominik Braun
2023-07-10 20:21 ` Athena Martin via Bug reports for GNU Guix
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jzv6979d.fsf@jpoiret.xyz \
--to=bug-guix@gnu.org \
--cc=64309@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=jgart@dismail.de \
--cc=lars@6xq.net \
--cc=ludo@gnu.org \
--cc=secure@alm.website \
/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 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).