From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oNlBNW48D2DNMwAA0tVLHw (envelope-from ) for ; Mon, 25 Jan 2021 21:47:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eNcVMW48D2DuNQAAB5/wlQ (envelope-from ) for ; Mon, 25 Jan 2021 21:47:26 +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 8D7CD940418 for ; Mon, 25 Jan 2021 21:47:26 +0000 (UTC) Received: from localhost ([::1]:58758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l49hl-0007fp-DJ for larch@yhetil.org; Mon, 25 Jan 2021 16:47:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l49h1-0007Di-OF for guix-devel@gnu.org; Mon, 25 Jan 2021 16:46:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33396) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l49gy-0004w6-PJ; Mon, 25 Jan 2021 16:46:39 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=56678 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l49gx-0004fO-7M; Mon, 25 Jan 2021 16:46:36 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: guix-devel@gnu.org, Maxim Cournoyer Subject: Re: 03/163: build/python: Add a new guix-pythonpath procedure. References: <20210125070022.22870.17321@vcs0.savannah.gnu.org> <20210125070114.03C0B20E1C@vcs0.savannah.gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 =?utf-8?Q?Pluvi=C3=B4se?= an 229 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 25 Jan 2021 22:46:33 +0100 In-Reply-To: <20210125070114.03C0B20E1C@vcs0.savannah.gnu.org> (guix-commits@gnu.org's message of "Mon, 25 Jan 2021 02:01:13 -0500 (EST)") Message-ID: <87czxs3d1i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.85 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 8D7CD940418 X-Spam-Score: -2.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: z5RF1u/0sqjD Hi! guix-commits@gnu.org skribis: > apteryx pushed a commit to branch cu/farewell-to-pythonpath > in repository guix. Woow! > commit c3c5bdd2b0ea4588ecba424fdbf6df101d967d3d > Author: Maxim Cournoyer > AuthorDate: Fri Jan 22 09:34:33 2021 -0500 > > build/python: Add a new guix-pythonpath procedure. >=20=20=20=20=20 > This procedure will be used in place where the static "PYTHONPATH" st= ring used > to be. >=20=20=20=20=20 > * guix/build/python-build-system.scm (guix-pythonpath): New procedure. [...] > +(define (guix-pythonpath inputs) > + "Derive the GUIX_PYTHONPATH_X_Y string , with the major and minor vers= ion > +numbers substituted for X and Y, respectively." > + (let ((python (assoc-ref inputs "python"))) > + (string-append "GUIX_PYTHONPATH_" > + (string-replace-substring (python-version python) "."= "_")))) One pattern used elsewhere, notably for =E2=80=98GUIX_LOCPATH=E2=80=99, is = to still keep a single environment variable (that=E2=80=99d be =E2=80=98GUIX_PYTHONPATH= =E2=80=99 here) but to ensure that only MAJOR.MINOR sub-directories are taken into consideration. IOW, instead of having GUIX_PYTHONPATH_3_8 and GUIX_PYTHONPATH_2_7, you=E2=80=99d have just GUIX_PYTHONPATH but Python 3.8 would only care about 3.8/ sub-directories while 2.7 would only care about 2.7/ sub-directories. That=E2=80=99s perhaps easier to document and to deal with generally (you o= nly need to look at one specific environment variable). Does that make sense? I don=E2=80=99t know if it=E2=80=99s applicable in t= his case though. (I didn=E2=80=99t follow the PYTHONPATH discussion so apologies if this com= ment is off!) Anyhow, thanks for this long awaited change! Ludo=E2=80=99.