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 ms11 with LMTPS id qC3GGHG1RGBwLgAA0tVLHw (envelope-from ) for ; Sun, 07 Mar 2021 11:13:53 +0000 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 YOqCFHG1RGAXYAAAB5/wlQ (envelope-from ) for ; Sun, 07 Mar 2021 11:13:53 +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 7E2172C888 for ; Sun, 7 Mar 2021 12:13:51 +0100 (CET) Received: from localhost ([::1]:46396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lIrM6-0005el-Lg for larch@yhetil.org; Sun, 07 Mar 2021 06:13:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIrLy-0005eb-AA for guix-devel@gnu.org; Sun, 07 Mar 2021 06:13:42 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:57440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lIrLv-0007n4-SY; Sun, 07 Mar 2021 06:13:41 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Dtf3h14NFz1qqks; Sun, 7 Mar 2021 12:13:36 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Dtf3h0kz4z1qw7w; Sun, 7 Mar 2021 12:13:36 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id wOXBs06nIuPP; Sun, 7 Mar 2021 12:13:35 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-62-194.dynamic.mnet-online.de [188.174.62.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sun, 7 Mar 2021 12:13:35 +0100 (CET) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id C36E2600A7; Sun, 7 Mar 2021 12:17:36 +0100 (CET) From: Hartmut Goebel To: Maxim Cournoyer References: <20210125070022.22870.17321@vcs0.savannah.gnu.org> <20210125070114.03C0B20E1C@vcs0.savannah.gnu.org> <87czxs3d1i.fsf@gnu.org> <878s8g3bxa.fsf@gmail.com> <87lfcdm9jb.fsf@gnu.org> <87im7fyg5c.fsf@gmail.com> <871rd296yo.fsf@gmail.com> Organization: crazy-compilers.com Subject: Re: 03/163: build/python: Add a new guix-pythonpath procedure. Message-ID: <3c1b9db7-e849-a863-b6e3-a40c12702389@crazy-compilers.com> Date: Sun, 7 Mar 2021 12:13:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <871rd296yo.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US Received-SPF: none client-ip=212.18.0.9; envelope-from=h.goebel@crazy-compilers.com; helo=mail-out.m-online.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615115631; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=87HsCPkJkzCGj4xPle1manZ1TYayvfh4SDq7bE82xl0=; b=W+mvwKJEJBAx8DzcQDPLfF8o+ChvR88kqTy5PCXgjNmFy1rX6GgLaPRS1dGb3v+9y4KxUq 3rEbgeg2RJ1GlyXhSHZ2B8uW/G1KQLGwKGgmOZsn1cirg80NrWs2bf0qmMNKG8QMcpEHu+ ATH1r/+goCNtvPDD2BquuEUyL3ffY163biJy+hx/rpFWcNEU0MyCkkkV/FzBLW9t/0Uc5v 4dabkwlujP0BDp0hlYv437ksxHacSoqiO14muV6qsVUVIQ8P5NEECVN+Gf8qtyp/ZPsje5 ZhDHLfcE38qZ2xspezs4Q8nH/dn6Bk9m63EV/QGNLnMjfgHosV6Iwp52054RnQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615115631; a=rsa-sha256; cv=none; b=GfdnwtskGIKgkEkm13zH+2LkOY26OYgq+LQN02ou1nNXlX9mNNbPTVtXvSd3z7OnlzdbPq UvYsDwm/Ms6BOBh9RgQVm4JgJiY13OdR4TWmnbpFQje0Q3z+vpcQRKMD6pTuiyHvswETFk O73Y6saHqxA/TMJ8UAk4pCprGOYFG6AO66Ttu33PesN2AOCbH5/gyd3GCHBYkO0RJjds3X BToO8JdQqDZAkgYuvuLVBrIdTlpJK6qUrHyUxE7eLRQYjN3BAxZJKl5SUHbOCrZQFo3F2s k+2s3PQVU4OQ9Q//ap6IsgtbpicE4mX1FdHH3b5B8wLtoJ+S/YmaM+5bgjTdpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.37 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 7E2172C888 X-Spam-Score: -2.37 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4Km4SM23zdc3 Hi schrieb Maxim, > Sorry for the delay. No problem, I reward this with another delay ;-) (Just kidding ;-) > Hartmut Goebel writes: > >> 2) This does not remove duplicates and does not honor .pth files in >> the respective directories - which might still be used. Thus >> site.addsitedir() should be called for adding the paths. This also >> takes care about duplicates. > I confess I didn't pay attention to .pth files, which mostly seemed lik= e > legacy cruft to me; are they still used in the context of PEP 517 and > modern Python packaging? =20 I can't tell for sure. (I rinember to have seen a note about .pth still being used in some setuptool-tick, but can't find it now.) Anyhow, since site.py still supports it, I would prefer to be on the save side and support it, to. > The problem with calling site.addsitedir is > that it simply appends to sys.path. We want to splice in the content o= f > GUIX_PYTHONPATH at a controlled location. site.addsitedir takes an option second arguments where the paths are collected into. >> 4) Since PYTHONPATH is evaluated prior to importing sitecustomize, any= >> sitecustominze.py in the user's path will overwrite our file, thus >> inhibiting our paths to be added. Not sure this is what we want in Gui= x. > I asked guidance on the #python channel on freenode and was recommended= > to use sitecustomize.py for this purpose; reading the doc here seems to= > confirm our usage of it is as intended [0]: IC. >> 6) Please add some more comments to the code explaining the idea. > I was under the impression the code was concise enough to forego with > verbose explanations; I'd rather keep it this way. Please add some comments. I had a hard time understanding it - and I was not even sure I understood, see my question (1). Another point, which came into my mind just now: Do virtuall environments still work as expected? (With --system-site-packages, packages in the profile are available, but venv-packages overwrite. Without ----system-site-packages packages in the profile are *not* available.) --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |