From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 79txESfkwGTVMgAASxT56A (envelope-from ) for ; Wed, 26 Jul 2023 11:15:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WAtzECfkwGSXaQAA9RJhRA (envelope-from ) for ; Wed, 26 Jul 2023 11:15:19 +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 D39214FB29 for ; Wed, 26 Jul 2023 11:15:18 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=OcoNmYGp; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690362919; 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:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=B5kvNX0PybBpre7ehFEhJUx+a7dzgaBpqAcZlR631w8=; b=oFc02SXXRUNHGcViqvkHInudM3RIIeTgv+p8QjAOWhts2Hv/aPHIzFyTqZzYIVmMhKuZac pYcvbqDo8+IBpcz+sJo3yjewwcxuOn1JXYJ+IZwuxaLVYX7/RtGi0vPMNSibEcEeVRaIEz uAT3FxBc1JMvxSVVd15T/gxMehSAwG/fDsRAGpmadf2DIGLkc/EoUEIugIBmPSvdLkgn+J lg+JTAyxeF7R193qhU/CSqy0oR6ak+Rmx6o9k6RN2xD438WDxAGn12vs3yYlrsBO0IPh/p DwIpNp5d1hF2S+77IhREdPZs0LRlG0dX0FHGjuIsoV9Upt1TzrsCksBNwP7cRQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=OcoNmYGp; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690362919; a=rsa-sha256; cv=none; b=nO74hgzQMas7NFsFV6H9P4MOhDuLZ06nPahAT0ljRE8mALoxbDhJWvYUP91F9nMzi2HK7N oA3guCaUGbNxIdmowfSaB8vSfaYbuy432R7SOYv8EjFUInfA9lXUxDWF0pLihGlEqwvkKZ IQZg3GEPfRPlG86GCu76su0pko5fkscmsUosF3HoQsLP0rGT5MRSCnW9TqJx0E4lw90xJ+ vPdVkT4cuRddD2U3V2dvFQz9+sOPQki6fCVawIiMl6KalrqSWUopkhO4STv5mIVMHyC5uG IXQLpTbMlpKFoH9gNkp4Bl3/eUxdKsl/w9f8QJAr62nU+Vqy91suKwYBEUQKFA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOabu-0000wo-34; Wed, 26 Jul 2023 05:15:10 -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 1qOabm-0000wI-HI for guix-patches@gnu.org; Wed, 26 Jul 2023 05:15:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOabm-0004X2-8u for guix-patches@gnu.org; Wed, 26 Jul 2023 05:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOabm-00070j-2E for guix-patches@gnu.org; Wed, 26 Jul 2023 05:15:02 -0400 Subject: bug#64573: [PATCH 0/3] guix: build: python-build-system: Have applications by default ignore non-Guix libraries in user site dir Resent-From: Wojtek Kosior Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 26 Jul 2023 09:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 64573 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: jgart , Lars-Dominik Braun , 64573-close@debbugs.gnu.org Mail-Followup-To: 64573@debbugs.gnu.org, koszko@koszko.org, koszko@koszko.org Received: via spool by 64573-done@debbugs.gnu.org id=D64573.169036290026922 (code D ref 64573); Wed, 26 Jul 2023 09:15:01 +0000 Received: (at 64573-close) by debbugs.gnu.org; 26 Jul 2023 09:15:00 +0000 Received: from localhost ([127.0.0.1]:47569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOabk-000709-Bg for submit@debbugs.gnu.org; Wed, 26 Jul 2023 05:15:00 -0400 Received: from koszko.org ([93.95.227.159]:49674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOabh-0006zy-OZ for 64573-close@debbugs.gnu.org; Wed, 26 Jul 2023 05:14:59 -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=B5kvNX0PybBpre7ehFEhJUx+a7dzgaBpqAcZlR631w8=; b=OcoNmYGp/+5t8Sb9zUpja7O6Dh rnwke6vn3yGXi3Uo+kNUwYC4tHTseP4H/Wq5gjei1AwFu139TXU79ItHQpZ/m/4zslt9v5R80CBpI ljkQ4GLoYG7EFFdp4qFW8sDeyQ+C6xG2ciMO6Sszoan8F6Lnr3KAh9C26bOswwnZRLc0hgRfiOTWd yz+13XrTs+1iOS/V7bZFG6olfXi6tyq2Ja491zCSCJakL3BoaNKfTI0nB4Cfnf2PAWDs640xo2kvM F7s7HDl4nvWSVvQLUiGBjMPoO5P3Vx/bXbOVBypd+d0inX9rrvP/x0xH9SaLoLVgnbe9DIJ44n7oW BXNMDTje9pCCHNXfqE7h9tJlCRufqOxvY8/L8gaxYj3kRzCA6X2NsoGWVgH0/embeC6goPeo2aydw nBFAJ2i5lckDZKg+ceI5iSq4muqjCQb3dvde7pY5aOA/MG5MJPdskGt5S2DOPjb/JVZVJ9uKUMHNV SucQqPHI/RmDCIGJPIVORw+Wy6fwEtX2vs3PIGzzRC+qwStBLRrbOgo0nHRCmBOUAlqTHvrrtHQmH cqVnpWPGVW6ZAFOD87Hf3TA2NWvZ/zxI9uQu8nGvUE7EA9tvkO1bpbGUcVjspSxlxrrNLby+ap+Wp y+tpjBtDgN9o1s/VWaMRqTu10ioN+lkqXcmLOOnAc=; Received: from [77.252.47.76] (helo=localhost) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOabd-0002EZ-ER; Wed, 26 Jul 2023 11:14:53 +0200 Date: Wed, 26 Jul 2023 11:14:51 +0200 Message-ID: <20230726111451.4700f17f.koszko@koszko.org> In-Reply-To: <875y6cokj7.fsf@envs.net> References: <875y6cokj7.fsf@envs.net> 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_/iUT1tOJTtk1cuHuORAu7yvb"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Wojtek Kosior X-ACL-Warn: , Wojtek Kosior via Guix-patches From: Wojtek Kosior via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -8.75 X-Migadu-Queue-Id: D39214FB29 X-Migadu-Spam-Score: -8.75 X-Migadu-Scanner: mx0.migadu.com X-TUID: 8wpYirEqwzox --Sig_/iUT1tOJTtk1cuHuORAu7yvb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > Hello, I think we can let pip just break as other distros (eg: ArchLinux > and Debian) with PEP-668. >=20 > https://gitlab.archlinux.org/archlinux/packaging/packages/python/-/blob/m= ain/EXTERNALLY-MANAGED > https://pythonspeed.com/articles/externally-managed-environment-pep-668/ > https://peps.python.org/pep-0668/#recommendations-for-distros >=20 > With usage guide towards virtual environments, guix shell, or pipx > (not packaged yet). >=20 > Consider other distros does the same thing, this should be safer. >=20 > What do you think? =F0=9F=A4=94 You're right, making pip break and recommend pipx seems like the right thing to do. I opened a new issue with patches that add python-pipx (haven't done anything related to the 'EXTERNALLY-MANAGED' file yet, tho). Thanks, Wojtek -- (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, 22 Jul 2023 08:30:04 +0800 =E5=AE=8B=E6=96=87=E6=AD=A6 wrote: > Wojtek Kosior writes: >=20 > > Python applications used to prioritize loading their libraries from so-= called > > "user site dir" (usually in ~/.local/lib/python/site-packages)= . The > > libraries would only be loaded from /gnu/store when not found in the us= er site > > dir. This used to cause hard-to-diagnose bugs like [1] when a user happ= ened to > > have a similar but incompatible version of a library installed via pip. > > > > These patches modify the python-build-system's procedure responsible for > > wrapping executables. The modified proc defines a PYTHONNOUSERSITE vari= able > > which makes Python applications disregard the user site dir when loading > > libraries. > > > > While this solution does harden most Python applications, it can also b= reak a > > few ones like pip that operate on the user site dir itself. To work aro= und > > that, the second patch introduces a change to pip to allow installing t= o the > > user site directory even when PYTHONNOUSERSITE is set by the Guix-creat= ed > > wrapper script. =20 >=20 > Hello, I think we can let pip just break as other distros (eg: ArchLinux > and Debian) with PEP-668. >=20 > https://gitlab.archlinux.org/archlinux/packaging/packages/python/-/blob/m= ain/EXTERNALLY-MANAGED > https://pythonspeed.com/articles/externally-managed-environment-pep-668/ > https://peps.python.org/pep-0668/#recommendations-for-distros >=20 > With usage guide towards virtual environments, guix shell, or pipx > (not packaged yet). >=20 > Consider other distros does the same thing, this should be safer. >=20 > What do you think? =F0=9F=A4=94 --Sig_/iUT1tOJTtk1cuHuORAu7yvb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCZMDkCwAKCRBLxSIcWnn9 GkkBAP9B+S08IbxYDZT1kGhzs+tNMnLZHAfJcH6Y9weQ+nOE7wD/TN9axLNnbAUK ALqxBPJeK5QOE7uRhUrTdDWe6dEnUAk= =CWvW -----END PGP SIGNATURE----- --Sig_/iUT1tOJTtk1cuHuORAu7yvb--