From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id wOkGCeadrWSnHgAASxT56A (envelope-from ) for ; Tue, 11 Jul 2023 20:22:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KHDYB+adrWSPSgEAG6o9tA (envelope-from ) for ; Tue, 11 Jul 2023 20:22:30 +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 DC7F7535A1 for ; Tue, 11 Jul 2023 20:22:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=DGEzSyS7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689099749; 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=J/Z6IHB1x/3cB8ACOvY0ckLMRJq4j4dJ0Gsw8j3E83g=; b=oCvPSOQDKX92YRbNn3g/lHBUZ9VIrKQ7qOPjamI8ACshEUNLT1q3hjlN/HCWmoY+AcXKd5 aRb2zH24CyZCoeTIJm0BAHwUDsbgcW32tkrRi31awzbaTDH6Rj9iOuyYTTGhYKmtw78gp8 1dgQ1pwdfR8XEzwOuAinsgI9ssWcDQqaX3KJ4PVgWQiSFYVCpt+HJktZC3dHsDROZQjP15 HUWxAFDsdit1oAib/qknO8076k9gvolWf5pnkRx9LTeUJjNGCna4kfzlq8nPMNU/fvYcvN wFD+0V8WieB3ldxDDfWjgsnD1CAmqcsmR8lRLzcV8p21eKasOx7dTwfWKmZygA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=DGEzSyS7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689099749; a=rsa-sha256; cv=none; b=p+HrEBH3XksOiX6kZo1qAo+ouJks1ybq/uJJd0FE6hZhJyKay3+9J1nPNiWvNpzGxGpnml 9W3q4KXec1YQdkdAw1aBNN1Q3I6r32FIAUoYJRLw9Zse97f8vHO4itsA7PHeIOV+eDRXW6 GdufiGRcRjhxXgtUqVA+1gyxhvAuZeqpahaDA3CQtksAXlrSv98bh8PpTl/Ug57Mc2vkvB fngkdOGbJesCDxlLeIIkOS/xOFRnyHBUtc+znxaQCDS8DBjNSEQoDTvFdkQLDBZqVMTksA 2Oj8h5OlervB5JuVpJRZvou3FF/75DQlfHQI17Wrlo5MZ5qqPOttlXruboTJTA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJHzw-0007Rz-He; Tue, 11 Jul 2023 14:22:04 -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 1qJHzt-0007Ro-OS for guix-devel@gnu.org; Tue, 11 Jul 2023 14:22:02 -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 1qJHzr-00028G-Ct for guix-devel@gnu.org; Tue, 11 Jul 2023 14:22:01 -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=J/Z6IHB1x/3cB8ACOvY0ckLMRJq4j4dJ0Gsw8j3E83g=; b=DGEzSyS7WoEvZzcC6iSalkJRaP 7OluYfcGXzVeK/qXt5x1QzE9c/GD6FQ/bR+28zMlMlc0k2JK6m9LzbEdQIrYH+daRSjKZtzyX5w2M KqDugBsw0Xym/0TZEIzOA15gyXlM+LE6O1jjrFek53uOJtcTw3gmWQnXVBxcQiDG1MmSZ5Kl/elMO /nLv6tFJRApbMFx+IDQWWeDUv7WfIvafi8zlTfds8xm4nYO8dw3+Hg8YD/NUlwaNBAUHbZw92MPdV IBBhbYZBtJgVLswzc9sQ7l7H9lyDUV59alAX6vprpo2VMiXAV76wLpTl4NUS12+jFRAPm2UGPkArW oQb4gS6R5wB+m5nKB/7l5VquXnzpCMWPIrkt2x2RDXZZTCuJ0CJ7UVO1xPZO2y17ecjb7RMQbO6V4 mAixrydfIUypIrxaJKOZJOgVB7xVOJrFlLZJS1DOgONhenveXkUYzhyV6kgk6ignHP126Jvcx8IF7 OqFDFuo/iQonabiGOoJsfb+UTJL9R1yds3JK9RTr5a4wA08iNg1+RH1JFj+GSWu96Z682/rBOtXL5 Q/NX3bS53zcGj1Elf0MU85N9h2b315ETu3fZvMm1umM2oEQZgG4yGYj/LsZt7Vg2TOJcqQDxuRvTZ ASnpvlPhf6EFi1Bg0deRsqy6ItATGK0QOk/FaVr08=; Received: from [77.252.47.107] (helo=localhost) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qJHzY-0007rx-Bp; Tue, 11 Jul 2023 20:21:40 +0200 Date: Tue, 11 Jul 2023 20:21:37 +0200 To: Maxim Cournoyer Cc: John Kehayias , =?UTF-8?B?5a6L5paH5q2m?= , edk@beaver-labs.com, guix-devel@gnu.org Subject: Re: Guix's python has pip's user dir in its loadpath Message-ID: <20230711202137.43c8b956.koszko@koszko.org> In-Reply-To: <87h6qfxa5t.fsf@gmail.com> References: <87edmey1wg.fsf@rdklein.fr> <877crma7qe.fsf@envs.net> <87edls1fyk.fsf@gmail.com> <20230701133257.6ada1e94.koszko@koszko.org> <871qhr1v6y.fsf@gmail.com> <87cz16kspd.fsf@protonmail.com> <87o7kpyrws.fsf@gmail.com> <20230706232835.343c6cfe.koszko@koszko.org> <87bkgnzw20.fsf@gmail.com> <20230707164405.0ce9dc4e.koszko@koszko.org> <87h6qfxa5t.fsf@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/3bFLF_do=XnpCoImf_ANBPQ"; 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Wojtek Kosior From: Wojtek Kosior via "Development of GNU Guix and the GNU System distribution." Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -7.20 X-Spam-Score: -7.20 X-Migadu-Queue-Id: DC7F7535A1 X-Migadu-Scanner: mx1.migadu.com X-TUID: /jzMJUWcg92y --Sig_/3bFLF_do=XnpCoImf_ANBPQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > I think maybe we could add a build argument called > e.g. '#:honor-user-site?' to disable the having PYTHONNOUSERSITE=3D1 in > the wrapper for a few select packages (e.g. pip, virtualenv, probably a > few others that are expected to work with or honor pip user-installed > Python packages). >=20 I just did[1] this (with some new developments described in the cover letter). As this was my first attempt at sending patches to Guix, please forgive my mistakes :) Best, Wojtek [1] https://issues.guix.gnu.org/64573 -- (sig_start) website: https://koszko.org/koszko.html fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A follow me on Fediverse: https://friendica.me/profile/koszko/profile =E2=99=A5 R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ=3D=3D | =C3=B7 c2luIHNlcGFyYXR= lZCBtZSBmcm9tIEhpbQ=3D=3D =E2=9C=9D YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ=3D=3D | ? U2hhbGwgSSBiZWNvbWUg= SGlzIGZyaWVuZD8=3D -- (sig_end) On Sat, 08 Jul 2023 01:08:30 -0400 Maxim Cournoyer wrote: > Hello, >=20 > Wojtek Kosior writes: >=20 > >> > I just saw this message and hurried myself up to test the patch to > >> > python-build-system that I made. Unfortunately, it turns out the > >> > "PYTHONNOUSERSITE=3D1" env var breaks pip which tries to install whe= els to > >> > the system site directory and fails due to a read-only filesystem. = =20 > >>=20 > >> I'm not sure I follow; why would PYTHONNOUSERSITE affect pip? I thoug= ht > >> it should only appear in wrappers of Python executables, not be set in= a > >> profile's environment (thus not affecting pip) ? =20 > > > > Indeed. And once I make my change, PYTHONNOUSERSITE gets also placed in > > the wrapper of the `pip` executable. > > =20 > >> Could you share the diff of the patch you tried so far? =20 > > > > I am attaching the patch file. > > > > I was trying to test with > > > > ./pre-inst-env guix shell -C --network --no-cwd python-xmldiff core= utils python-pip > > pip install xmldiff=3D=3D2.4 > > echo > ~/.local/lib/python3.10/site-packages/xmldiff/main.py > > xmldiff --help > > > > Without my patch, we get an error on 4th line. With my patch, we get > > the "Read-only file system" error on the 2nd line =20 >=20 > Neat! I think maybe we could add a build argument called > e.g. '#:honor-user-site?' to disable the having PYTHONNOUSERSITE=3D1 in > the wrapper for a few select packages (e.g. pip, virtualenv, probably a > few others that are expected to work with or honor pip user-installed > Python packages). >=20 --Sig_/3bFLF_do=XnpCoImf_ANBPQ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCZK2dsQAKCRBLxSIcWnn9 Gr2nAQDLqv41npGDryKVB/EhTZedbQfI94lk4jJmiRNywxqrJgD9Gcb2Pu64OgcT czFWCsotHylRJ/XrdQpM46WgIBvF5gQ= =3nUd -----END PGP SIGNATURE----- --Sig_/3bFLF_do=XnpCoImf_ANBPQ--