unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Csepp <raingloom@riseup.net>
Cc: Wojtek Kosior <koszko@koszko.org>,  help-guix@gnu.org
Subject: Re: program prepared with `guix pack` unusable by end users
Date: Thu, 27 Oct 2022 12:59:23 -0400	[thread overview]
Message-ID: <877d0ljj84.fsf@gmail.com> (raw)
In-Reply-To: <87ilk61hpu.fsf@riseup.net> (Csepp's message of "Wed, 26 Oct 2022 21:55:58 +0200")

Hi,

Csepp <raingloom@riseup.net> writes:

> Wojtek Kosior via <help-guix@gnu.org> writes:
>
>> [[PGP Signed Part:Undecided]]
>> My problem has been solved. It turned out the Python interpreter
>> contained within the pack was finding an older version of `hydrilla`
>> Python package installed in `~/.local/lib/python3.9/site-packages` and
>> that older version was missing the `console_scripts` entry point that
>> was being loaded. It's worth mentioning that Python interpreter gives
>> `~/.local/lib/python3.9/site-packages` priority over the paths that
>> Guix adds to GUIX_PYTHONPATH.
>>
>> The solution was to patch the wrapper script for each of the commands
>> my package provides. Definition of PYTHONNOUSERSITE enviroment variable
>> stops Python from looking at local site packages.

[...]

>> It's worth noting that this problem is not exclusive to `guix pack` or
>> to my particular package. Users of other Python programs could in some
>> circumstances experience similar issues. Which makes me think -
>> shouldn't the default behavior be changed? Perhaps by making Python
>> give paths from `GUIX_PYTHONPATH` priority over those in user site
>> packages directory? Should I report this as a bug to bug-guix@gnu.org?
>>
>> Best,
>> Wojtek

[...]

> IMHO yes, the pack output does not work as expected.  That's the
> definition of a bug.

I disagree.  That Python gives precedence to USERSITE compared to
site-packages and GUIX_PYTHONPATH is by design, so that users can
override system provided libraries such as those by Guix.  It used to be
the other way around, and it caused all sort of problems such as
virtualenv not working as expected on Guix.

-- 
Thanks,
Maxim


  reply	other threads:[~2022-10-27 17:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 16:20 program prepared with `guix pack` unusable by end users Wojtek Kosior via
2022-10-13 17:34 ` (
2022-10-14  7:33 ` zimoun
2022-10-14  9:09   ` Wojtek Kosior via
2022-10-14 11:00     ` zimoun
2022-10-17 13:36       ` Wojtek Kosior via
2022-10-26  7:23         ` Wojtek Kosior via
2022-10-26 19:55           ` Csepp
2022-10-27 16:59             ` Maxim Cournoyer [this message]
2022-10-27 17:28               ` Wojtek Kosior via
2022-10-28 15:38                 ` Maxim Cournoyer
  -- strict thread matches above, loose matches on Subject: below --
2022-10-13  6:26 Greetd autologin? kiasoc5
2022-10-13  6:33 ` (
2022-10-13  7:17   ` program prepared with `guix pack` unusable by end users Wojtek Kosior via
2022-10-13  8:26     ` (
2022-10-13  9:51       ` Wojtek Kosior via
2022-10-13 13:19     ` zimoun

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=877d0ljj84.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=koszko@koszko.org \
    --cc=raingloom@riseup.net \
    /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.
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).