From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YP3QAyfAWmMKygAAbAwnHQ (envelope-from ) for ; Thu, 27 Oct 2022 19:30:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cJXTAyfAWmOXVgEAauVa8A (envelope-from ) for ; Thu, 27 Oct 2022 19:30:15 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AAD0551CC for ; Thu, 27 Oct 2022 19:30:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo6gP-0006U9-3N; Thu, 27 Oct 2022 13:28:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo6gH-0005tY-R2 for help-guix@gnu.org; Thu, 27 Oct 2022 13:28:37 -0400 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo6gF-0000Ov-Q3 for help-guix@gnu.org; Thu, 27 Oct 2022 13:28:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=07o+DhHg5fXBWvsa12PrFLJiq6K+PXzrgyi/mSH0x9U=; b=fsz53bcIg1lnzJJemdvw/yQsnI UoMAyaT+JD0qhENa9el/aGJb6YfMqdIoi8pBAr55WDPYMqKuGdDyVe/XLbN/A6bpbXCuTuDxovkh7 mOuV2evLYujxYFz6kaiv93bMzdi7tzBfKil2pj7EKleFMfZNNyDv9X6nLqVJQ+wkYiLes/NTOuWFd 3yk+xLbqFjjTxUXVYsAVIkSOIlFw4yQoA12jODlt04YHb1q15gOf9MqcAaBbF35vl5BQNtOub45w/ Abv82SCDyC+gRmKWiqTcMlrlI4YkviuuqtnzQQQpYAXL1zfgRRjgkCIUJVrHW19TTZNVWeeR+IIh+ EFTvjFUzkfwDT7jzlAiAPo9D+rYOPMSqzXzxstvC3VHdfzt/lgw9s09PbCT/tUYpwLy7Gdqdiq/Gc ujY5feKVKwkIKyey+o58/qHsYW3j3C3Lm/kbt7ovPtu1uQzLwtog51jbNhhHEwjdFISPfFFC8c0dZ ztP0rt0MKl6jtbo8oKOrP6fMguUD4Hfqx+Zkd24ZwdFprvblv5OlbiPb6nQPJWoukI5GyLICeBpIl V+qF98Jvtbyfjmt7joM4OaNVwnWdAbGx9koSYDV1PD7bJQ1oKjnRoHqM1ErIm7SC2kYHegQRCMrhA QKJRZwNbNLtrfann2BUkWQjQtk5lvWYSYyse+mFIU=; Received: from 77-252-46-225.static.ip.netia.com.pl ([77.252.46.225] helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oo6g8-0004Rs-0F; Thu, 27 Oct 2022 19:28:28 +0200 Date: Thu, 27 Oct 2022 19:28:25 +0200 To: Maxim Cournoyer Cc: Csepp , help-guix@gnu.org Subject: Re: program prepared with `guix pack` unusable by end users Message-ID: <20221027192825.08f0af15@koszkonutek-tmp.pl.eu.org> In-Reply-To: <877d0ljj84.fsf@gmail.com> References: <20221013182027.2044d8ff@koszkonutek-tmp.pl.eu.org> <87czaurh9e.fsf@gmail.com> <20221014110911.66168330@koszkonutek-tmp.pl.eu.org> <87mt9ypt4t.fsf@gmail.com> <20221017153648.7185c235@koszkonutek-tmp.pl.eu.org> <20221026092330.6df3870c@koszkonutek-tmp.pl.eu.org> <87ilk61hpu.fsf@riseup.net> <877d0ljj84.fsf@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/rqPc7oP5JTkHQLJfzFjbE69"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Help-Guix" Reply-to: Wojtek Kosior From: Wojtek Kosior via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666891814; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=07o+DhHg5fXBWvsa12PrFLJiq6K+PXzrgyi/mSH0x9U=; b=jCHJwbk3jLm8rBpmLGbewKzeIH5Acn04QukuXb5BO4r5EymZW/8plkUW1y1TJsqBwfIIvY PntgKxEDxao/5xM5LrwyiK6v4vhjs7iPKWRrfQP0ILdWy8fbmXSrGp+pJZTrGBswB/wZOC 92J6zwSyo5FanZQw4VrxccJJZgzdK5ecmmLmLF6SY6HV+hH6XhV8vTgK+lUENwhwFSA57c 1H5cVVf6RgA6Jq4RKPUaI4ozZAGXGdRu6UsREqPSb6qlA+B583qtEdX1WqeptUgup9FPJB l/GTUgsay3vnmXKYnijJrCl2lS63puYL7Xf8XRGGETm7T/jcmOku0d/4mMEDbg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666891814; a=rsa-sha256; cv=none; b=ta2E6UHezY/jvwH82wrp9r3LRuAb4KMaqK++qsVD0LxIosMxqKjgfFShaQ1wu2Pqi/ahxt ruQaKeoK0r9Jl819JodcKnjMeXXXlNiswWZnznEIQKPuRQAd0bueEHvlq6PvpMvagVwJwL cR9XwQDgC91PhRrppTF/N6a5fr0RJcgUZdGSL9cs8NIq3weriOO1YTCBE3g7LpI15y16Vt 7VudNXJtaslLqDAo2W18+u/71aQ8kDRbVjYStDQK9BH4Ljhq+lXLe6xY4kAaT2E6DkzYzh f8PwPSlebJzNt3y90PNPm8eQcjDloMtutT5CLi1BPBe0Rmk/ukx9SeT/LUMvlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=fsz53bcI; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.12 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=fsz53bcI; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: AAD0551CC X-Spam-Score: -4.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: tUXhBD9VNk4C --Sig_/rqPc7oP5JTkHQLJfzFjbE69 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > IMHO yes, the pack output does not work as expected. That's the > > definition of a bug. =20 >=20 > 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. Perhaps the best solution would be to * have Python interpreter itself give precedence to user site packages but * have user site disabled (or enabled with lower precedence) by default for Python applications. Consider the creation of wrapper script for python programs as it is done now[1]. Is there currently any application that would behave incorrectly with PYTHONNOUSERSITE exported as 1 and `~/.local/lib/python/site-packages/` included in GUIX-PYTHONPATH after the other paths? If there is, perhaps it would be at least easier to make a workaround for this single application? [1] https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/python-build= -system.scm?id=3D176a501360699581b49f19ffde1ea3bb6285b8be#n225 -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A Meet Krak=C3=B3w saints! #0: saint Albert Chmielowski Poznaj =C5=9Bwi=C4=99tych krakowskich! #0: =C5=9Bwi=C4=99ty Albert Chmielo= wski https://pl.wikipedia.org/wiki/Adam_Chmielowski -- (sig_end) On Thu, 27 Oct 2022 12:59:23 -0400 Maxim Cournoyer wrote: > Hi, >=20 > Csepp writes: >=20 > > Wojtek Kosior via writes: > > =20 > >> [[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. =20 >=20 > [...] >=20 > >> 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 =20 >=20 > [...] >=20 > > IMHO yes, the pack output does not work as expected. That's the > > definition of a bug. =20 >=20 > 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. >=20 --Sig_/rqPc7oP5JTkHQLJfzFjbE69 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCY1q/uQAKCRBLxSIcWnn9 GoVkAP0XVn/vsZTjBERUW5t5xGBPdxDWYBtN+nxnekx3Qf4OiAEAmpDUeKxUO9Vi QfUswwJ9p6C5t2I9/Am2O6rXp2jibgs= =3Vo8 -----END PGP SIGNATURE----- --Sig_/rqPc7oP5JTkHQLJfzFjbE69--