From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uGwoCK4Mu2FxQAAAgWs5BA (envelope-from ) for ; Thu, 16 Dec 2021 10:53:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eHzQA64Mu2H7bAAAB5/wlQ (envelope-from ) for ; Thu, 16 Dec 2021 09:53:50 +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 DD9D92074F for ; Thu, 16 Dec 2021 10:53:49 +0100 (CET) Received: from localhost ([::1]:52552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxnSP-000379-1O for larch@yhetil.org; Thu, 16 Dec 2021 04:53:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxnOm-0004h8-Mn for bug-guix@gnu.org; Thu, 16 Dec 2021 04:50:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxnOk-0002Ty-Sm for bug-guix@gnu.org; Thu, 16 Dec 2021 04:50:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxnOk-00074g-RE for bug-guix@gnu.org; Thu, 16 Dec 2021 04:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52269: [core-updates-frozen] sitecustomize.py does not honor .pth files Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 16 Dec 2021 09:50: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.163964815627096 (code B ref 52269); Thu, 16 Dec 2021 09:50:02 +0000 Received: (at 52269) by debbugs.gnu.org; 16 Dec 2021 09:49:16 +0000 Received: from localhost ([127.0.0.1]:34609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxnO0-00072x-2O for submit@debbugs.gnu.org; Thu, 16 Dec 2021 04:49:16 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:12922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxnNu-00072e-M2 for 52269@debbugs.gnu.org; Thu, 16 Dec 2021 04:49:14 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:105:465:1:3: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 4JF6l401qCzQlNJ; Thu, 16 Dec 2021 10:49:04 +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=1639648142; 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: in-reply-to:in-reply-to:references:references; bh=UyMVqYhsH1WiA0FB163TMNBLrTNri8BCwlfKfGxQCt4=; b=RvWRMP5Lk2YzeVdZSnRe0AfLcNp7spcmpWFP4SJ3au230m77X70SgThbQa1ECSrfCoE+J6 gL++Loq9kyob68V+CW0A4zpmf9jYytGXTtG3MFyahdY0UL6QNgmweUt5p33FEBnV18iNci 2W1s5mkp5sguzyUmpdccuh5N4Its1mM4MYBIWZTytxAZETHsqdsDb6hf0E2Of+8IsQKz4K CE6/V9iTKVolNXijx8r6Abw48VDFVHhfEfv3ui/4EGCXtBvEzq6xyiRlJ2dH2FeupfeK/L HcRqwJU2ev3MvEZMYGjwcH+13vyaH8S+w/K+PIInanzvkKoOpvNy9klL8OPGgw== Date: Thu, 16 Dec 2021 10:48:55 +0100 From: Lars-Dominik Braun Message-ID: References: <871r2taxcm.fsf@gmail.com> <87ee6gcomm.fsf_-_@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ee6gcomm.fsf_-_@gmail.com> 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=1639648429; 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: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=UyMVqYhsH1WiA0FB163TMNBLrTNri8BCwlfKfGxQCt4=; b=is50Jk2Q1F6SA8G2uiwc26U0dzgmuEHML0MvSh9dVJbXf+gX9qCrpP5uTH3EhfJHagaq4r ndsIoCmSayw5OMtR73GlzC5Xck8RwQE+pyoQ5RlLtNapPcs3JHNYtiZe7EAaxCahR6hQAt JCIkJhZkZi1WKLkuDGfjkRs5QeN5XcbmQj5EyVPnGLuQHvMfrednUoSLWe3Ca0Uiv6ddB9 Kit8Ew7uYKjF5Uxcp27QZw+SWwUw6a0BhC6/+yfU/2c5VtzGIvSSfgKaFu6dnlHz9sBcpN bVJsf/SFVy7CugfD+FYadU0V/VTFrh2Ao6B3EN7gN8Ch/vtSQPgN0dLx+yzLDA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639648429; a=rsa-sha256; cv=none; b=jBv7d6IPadexqLI14VMpQ1PFIeRac+o6LBISEvcU+9nl5SXVZaYRqsfwIbfHl6EHT5QUmP nPtchzUtKipwvbHkNRNAiXuVdmi5VOBSX4PR0g9MUV/9NxyvGQh56SVMdG33qupkrbdVZ4 tLp1W4MGvajHCdykMgalqpZ/nXCVLBfd9wz9VnHAJCSx8uNpOp5K/McoFHncMO+Y7wiKwC RzO3b1MEk+SF5yQf1f8WhQYnMLAk+uGODBdrkh7a6UIP2kd3eV8Xy3JYW6BbCPf9ra5MoD MVI+f7100q9KTChUDJaR6qz2pYHJgqNGtKJMhjWVxwyodOtomMo/11zTDvkZbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=RvWRMP5L; 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: -3.39 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=RvWRMP5L; 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: DD9D92074F X-Spam-Score: -3.39 X-Migadu-Scanner: scn0.migadu.com X-TUID: oEugOdVCTkDT Hi Maxim, > You can test it by placing the new sitecustomize.py file in the current > directory, and then: that works, thanks! > I agree that after it's un-bundled it shouldn't be necessary anymore, but > let's keep this change for core-updates along work on the 517 > python-build-system (I'll try having a look to it after the next release > it out -- ping me otherwise). Sure. > + # 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]) One more nitpick: list.index() will raise a ValueError if the requested value does not exist. I believe setting GUIX_PYTHONPATH=/nonexistent will trigger this. Cheers, Lars