From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2DIlL2JrxmOGlAAAbAwnHQ (envelope-from ) for ; Tue, 17 Jan 2023 10:33:22 +0100 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gD9OLmJrxmPqwQAAG6o9tA (envelope-from ) for ; Tue, 17 Jan 2023 10:33:22 +0100 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 aspmx2.migadu.com (Postfix) with ESMTPS id 6DE9D1A9E for ; Tue, 17 Jan 2023 10:29:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHiHM-0003KJ-5R; Tue, 17 Jan 2023 04:29:16 -0500 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 1pHiHA-0003CF-SU for bug-guix@gnu.org; Tue, 17 Jan 2023 04:29:11 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHiH9-0001YK-CM for bug-guix@gnu.org; Tue, 17 Jan 2023 04:29:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHiH8-0000PN-H5 for bug-guix@gnu.org; Tue, 17 Jan 2023 04:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#25235: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 17 Jan 2023 09:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25235 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: arunisaac@systemreboot.net, 25235@debbugs.gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org Received: via spool by 25235-submit@debbugs.gnu.org id=B25235.16739477201531 (code B ref 25235); Tue, 17 Jan 2023 09:29:02 +0000 Received: (at 25235) by debbugs.gnu.org; 17 Jan 2023 09:28:40 +0000 Received: from localhost ([127.0.0.1]:35691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHiGl-0000Oa-9X for submit@debbugs.gnu.org; Tue, 17 Jan 2023 04:28:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHiGj-0000O0-KX for 25235@debbugs.gnu.org; Tue, 17 Jan 2023 04:28:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHiGa-0001Jp-Q0; Tue, 17 Jan 2023 04:28:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=RRvF4LlqUgkR+kf6wScGnshRK78zHzroXxnYBVydGqQ=; b=h0+sogYdwyRDWpWkE8vR 0IZyg3hbvbm3hYRRfsM3c19px5ayCSw+EG7dQbEZugov3r0KP4wn/W7h3rE2+DgxLYY7R/S78KQlP rCfB+OIUXGCj4kGSvV4PQnm+vgIZvOo7eMcfpPRFdUDTLmeTnqEWZCNuGtG1yiCdjvPbUPogWfl78 NR4ec1y1Au7JhQJ8NxngT+hWfKPnx+61YUpbaWEtS17AZUa/DuiRIhGnTzVL8zes/xVuGINTQQOCl 5nbICUU4o80K9/J38FRLsmEq28fIntePZ7fV4JccXNJMWek8wp8/Q8gKzg/9wG+hyKJu8t3/hjolG voY8SU/BzSjSeg==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHiGU-0004M2-Rd; Tue, 17 Jan 2023 04:28:23 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230116212920.9641-1-maxim.cournoyer@gmail.com> <20230116212920.9641-2-maxim.cournoyer@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 28 =?UTF-8?Q?Niv=C3=B4se?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Zinc 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: Tue, 17 Jan 2023 10:28:20 +0100 In-Reply-To: <20230116212920.9641-2-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Mon, 16 Jan 2023 16:29:19 -0500") Message-ID: <874jspjyrv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-TUID: ZMn6f6GxqCx8 Hi, Maxim Cournoyer skribis: > Fixes . > > * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argum= ent. > Filter out native inputs from the values in GUIX_PYTHONPATH. Yay, great to see this fixed! > guix/build/pyproject-build-system.scm | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject= -build-system.scm > index a66c1fb34a..cd418f7ec9 100644 > --- a/guix/build/pyproject-build-system.scm > +++ b/guix/build/pyproject-build-system.scm > @@ -445,7 +445,7 @@ (define* (add-install-to-pythonpath #:key native-inpu= ts outputs > "A phase that just wraps the 'add-installed-pythonpath' procedure." > (add-installed-pythonpath native-inputs outputs)) >=20=20 > -(define* (wrap #:key inputs outputs #:allow-other-keys) > +(define* (wrap #:key native-inputs inputs outputs #:allow-other-keys) > (define (list-of-files dir) > (find-files dir (lambda (file stat) > (and (eq? 'regular (stat:type stat)) > @@ -464,9 +464,17 @@ (define bindirs > (define %guile (delay (search-input-file inputs "bin/guile"))) > (define (guile) (force %guile)) >=20=20 > - (let* ((var `("GUIX_PYTHONPATH" prefix > - ,(search-path-as-string->list > - (or (getenv "GUIX_PYTHONPATH") ""))))) > + ;; Use the same strategy to compute the native-input file names. > + (define %native-input-dirs (delay (match native-inputs > + (((_ . dir) ...) > + dir)))) > + (define (native-input-dirs) (force %native-input-dirs)) > + > + (let ((var `("GUIX_PYTHONPATH" prefix > + ,(remove (lambda (x) > + (any (cut string-prefix? <> x) (native-input-d= irs))) > + (search-path-as-string->list > + (or (getenv "GUIX_PYTHONPATH") "")))))) I think there=E2=80=99s no need to delay+thunk things since we=E2=80=99re u= sing them right away. How about: (define native-input-directories (match native-inputs =E2=80=A6)) (let ((var `("GUIX_PYTHONPATH" prefix ,(remove (lambda (x) =E2=80=A6 native-input-directories =E2= =80=A6) =E2=80=A6)))) =E2=80=A6) ? (Same for =E2=80=98%guile=E2=80=99 above, but I don=E2=80=99t see it in =E2= =80=98master=E2=80=99; maybe that=E2=80=99s from another branch?) Thanks, Ludo=E2=80=99.