From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WDvKFWDNrWErPQEAgWs5BA (envelope-from ) for ; Mon, 06 Dec 2021 09:44:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YGGWEWDNrWF6cwAA1q6Kng (envelope-from ) for ; Mon, 06 Dec 2021 08:44:16 +0000 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 20E32B00D for ; Mon, 6 Dec 2021 09:44:16 +0100 (CET) Received: from localhost ([::1]:54884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mu9ba-000481-Sc for larch@yhetil.org; Mon, 06 Dec 2021 03:44:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mu9bO-00047m-PM for bug-guix@gnu.org; Mon, 06 Dec 2021 03:44:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mu9bO-0001OS-ID for bug-guix@gnu.org; Mon, 06 Dec 2021 03:44:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mu9bO-0004dp-Ee for bug-guix@gnu.org; Mon, 06 Dec 2021 03:44:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52269: [PATCH] sitecustomize.py: Honor .pth files. References: <871r2taxcm.fsf@gmail.com> In-Reply-To: <871r2taxcm.fsf@gmail.com> Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 06 Dec 2021 08:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52269 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Maxim Cournoyer Received: via spool by 52269-submit@debbugs.gnu.org id=B52269.163878019217768 (code B ref 52269); Mon, 06 Dec 2021 08:44:02 +0000 Received: (at 52269) by debbugs.gnu.org; 6 Dec 2021 08:43:12 +0000 Received: from localhost ([127.0.0.1]:60484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu9aZ-0004cV-MG for submit@debbugs.gnu.org; Mon, 06 Dec 2021 03:43:11 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:27836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu9aW-0004c9-GK for 52269@debbugs.gnu.org; Mon, 06 Dec 2021 03:43:10 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4J6xlT60wvzQkBn; Mon, 6 Dec 2021 09:43:01 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1638780179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mro54vXASUDT44XMbXa0FrEva3PWS2ilAD4vwHEfjxk=; b=oA9sBZ/EZfgkDStq3IVSo99BuQ/CYtfxUclWJmQXh3bHgu0fda//qM2U2edkSqM48RUOuG sxgvOLLrs5oPxYHiCEcwdEK0B3W5wFERlwZ/EtZVAbyhQXWFfPtofe8H7evy6agM52wcJu L94PebKxyBUka0nx+1ExrMgfmZTw9GRV55uFXh8ywXLFl6h+iFSce/GSoC7gxLPTqJD8+J uUnUsyBmrXsa4iAbPFpjHZdDmERyGGhwzxD9hA1vozO70M/XA9TifpusYlxpcerkze7RYK Y/AWkWjGaFF6cBLihlQPznH2hP2vyavugFpef67TZaTcX8Yhc+x2I5nwYBJCeA== Date: Mon, 6 Dec 2021 09:42:56 +0100 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 52269@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1638780256; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: 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=Mro54vXASUDT44XMbXa0FrEva3PWS2ilAD4vwHEfjxk=; b=VxvT/za1no0LPhC8jqUpd5s4yQqz0s6R5YnC28BYB9Ok06SQPQpe3g1TEEph26imYaQQqd PsjARoGwXAn0Nm0ooeGJZ0urkYnsXNYv3JHrjR3S19/cBYF4LjF14gCECU56wnON+MGpvu G6J3+KfagWm2ND/ElQtOGtjq9QOV4vQnsldmM9MXZqLWqm8cYT9wA2De5pu77+DkZ+f+Su 6nWrTcE9imNrQagdcwi0Z6ZB6Tn5SrOylViY4IX7+4zPvRPkdqCSd9ea7VuBz+O9ya4VCt 9UdMh78oGjeIjfCHQ8w92F5i0w4V7ZXJGdioW26t+Xp+b/bUq8c5KOTZkrAQkQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638780256; a=rsa-sha256; cv=none; b=m/Tx4M51rHGA7FmUVBq03TIsFv9UEocDORyBDEun1XvTArRbKa1cZ7lqVf3Qk9Ka04wzlg yWjaDx30HqNLgAqwmF5ilGdV2LUQSDw98hY32AIhustK1l6Cqf1ATgzy2ZrIbI+ad5jtOL q5oEgKnjCuBBpOzn4A8lFNQ4LotUI4Eh768De+wBvmYZZ1R8+cJ7UQxSVLTBoRNomPIN6+ 2OIlFT64hjPXu6eBbiIUVh13UzPPURWa9RcNopz4qmpt0DjH2Su94Bf3h/C6FfrR15akol qSNjrPS1AypQYnoL6PYA7h6SxTcO0XocOtuWaqdhLxMgIh6Y9R6op4Qr7cH6Lg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b="oA9sBZ/E"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b="oA9sBZ/E"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 20E32B00D X-Spam-Score: -2.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: KTE2BCeQhjAw Hi Maxim, > +if not matching_sites: > + exit(0) are you sure about using `exit()` here? sitecustomize.py is imported during startup and this would simply quit the Python interpreter if GUIX_PYTHONPATH is not set, wouldn’t it? (Can’t test the change unfortunately, because it’s a massive rebuild.) > +# Move the entries that were appended to sys.path in front of Python's own > +# site-packages directory. This enables Guix packages to override Python's > +# bundled packages, such as 'pip'. > +python_site_index = sys.path.index(python_site) > +new_site_start_index = sys.path.index(matching_sites[0]) > +if python_site_index < new_site_start_index: > + sys.path = (sys.path[:python_site_index] > + + sys.path[new_site_start_index:] > + + sys.path[python_site_index:new_site_start_index]) This is unrelated to the pdb issue, right? I see that it’s necessary right now, but as suggested in #46848 I’d prefer unbundling setuptools/pip from python. (I’ll send a v3 of the patchset at some point.) Cheers, Lars