From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id yC0aIocNMmYhWQEAe85BDQ:P1 (envelope-from ) for ; Wed, 01 May 2024 11:38:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yC0aIocNMmYhWQEAe85BDQ (envelope-from ) for ; Wed, 01 May 2024 11:38:15 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714556295; h=from:from:sender:sender:reply-to: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; bh=jKAAVHSEiHZS+LoqJWjb/H1Z4mW5FQJInJjDYooBjL4=; b=c+whFbJHiZLbRmrZK0DB5XVT0a6paOGvGQSysiSK/cMniTmgQVIeNpJHUFhBpuvXqk/9PO jzCkXY1gQKIJSzpA2D1GEv9xEulMTVQrN8tkLggInniijP0hq38tn6DCq353q//BKaQkoh l+QX5cC/lT3CsxJzfxS3pdyLHMBmTZZK3ajUFnWorkJqTOUdZ/J4iVpN2USXZucXhWk7Xi gVGSSowalMqLhPsIRqXIcDWB3MdoK0euyuj3GU8ETIuMw26sDMhCuPWe0+oNSJyWOLvHdc 3mvY/8yQqb6qzLweox5acWF+FCZIH8GnPaqhc+aDJPp+GO8YGzEWA/xQddj1/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714556295; a=rsa-sha256; cv=none; b=YpA4WHZ+ac00yoIu4uPWQSFhk802m3IAv686FLCIF64SZWRcC903YVtxw2HiA9Wb9BX4e2 UOHU7UYi/51QxKLnes7W9rqZcUCIO6/TDdpgM9xYhPU8zPXaNskx6JPvxxTDasjh5enYrR yd2tIXJ11Rt0uPIbLO/b/5bjziL/bzSEXAJP2ygcFRYgwLNbxHVCsT1RZEbMxvdRNPyIXw akWftEtq9fosQA92yFTuY36/FY+f42eH8d2b7LPppTYtNKhRbKeY7PRq5vlO8np2zfPXXf bz+gY/BzgbMsm2Bm2d+2NlOvvJkYEDFYC0kkHhpIQFUfSZM+FH3C5vMw6FMTmw== 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 1C09F6F9AA for ; Wed, 1 May 2024 11:38:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s26PI-0007kM-Vd; Wed, 01 May 2024 05:37:45 -0400 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 1s26PG-0007jZ-1F for bug-guix@gnu.org; Wed, 01 May 2024 05:37:43 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s26PF-0005UL-Oj for bug-guix@gnu.org; Wed, 01 May 2024 05:37:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s26Pa-00045g-HV for bug-guix@gnu.org; Wed, 01 May 2024 05:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#25235: [Maxim Cournoyer] bug#25235: [PATCH v3 1/1] build-system/pyproject: Do not wrap native-inputs. In-Reply-To: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 01 May 2024 09:38: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: Lars-Dominik Braun , Ricardo Wurmus Cc: 25235@debbugs.gnu.org Received: via spool by 25235-submit@debbugs.gnu.org id=B25235.171455623915713 (code B ref 25235); Wed, 01 May 2024 09:38:02 +0000 Received: (at 25235) by debbugs.gnu.org; 1 May 2024 09:37:19 +0000 Received: from localhost ([127.0.0.1]:36415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s26Os-00045N-QS for submit@debbugs.gnu.org; Wed, 01 May 2024 05:37:19 -0400 Received: from 14.mo561.mail-out.ovh.net ([188.165.43.98]:47819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s26Op-00045H-CQ for 25235@debbugs.gnu.org; Wed, 01 May 2024 05:37:17 -0400 Received: from director11.ghost.mail-out.ovh.net (unknown [10.109.176.32]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4VTsQr3P5nz1GxD for <25235@debbugs.gnu.org>; Wed, 1 May 2024 09:36:52 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-lw6sl (unknown [10.111.182.62]) by director11.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 611DA1FD81; Wed, 1 May 2024 09:36:51 +0000 (UTC) Received: from ngraves.fr ([37.59.142.109]) by ghost-submission-6684bf9d7b-lw6sl with ESMTPSA id yZHaDTMNMmYNywYAmvjX3A (envelope-from ); Wed, 01 May 2024 09:36:51 +0000 X-OVh-ClientIp: 81.67.146.208 References: <20230123133434.1852-2-maxim.cournoyer@gmail.com> Date: Wed, 01 May 2024 11:36:50 +0200 Message-ID: <874jbheuvh.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 951385424673825483 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdduhedgheelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufhffkfggtgfgsehtqhertddttdejnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepgfekleeuvddvueekjeevudfgheejvdfgfeefgeejuedvhedvheehieeigfeuueeinecuffhomhgrihhnpehgnhhurdhorhhgnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopedvhedvfeehseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth 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: , Reply-to: Nicolas Graves From: Nicolas Graves via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.39 X-Spam-Score: -5.39 X-Migadu-Queue-Id: 1C09F6F9AA X-Migadu-Scanner: mx13.migadu.com X-TUID: 08VaRoyZW4vD Hi Lars, Ricardo, I'm advancing with my patch series, which I can submit soon. I was curious about why this 25235 patch isn't in python-team branch yet since it's also a very welcome change to the pyproject-build-system. Cheers, Nicolas -------------------- Start of forwarded message -------------------- Subject: bug#25235: [PATCH v3 1/1] build-system/pyproject: Do not wrap native-inputs. To: 25235@debbugs.gnu.org Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , efraim@flashner.co.il, rekado@elephly.net, jgart , marius@gnu.org From: Maxim Cournoyer Date: Mon, 23 Jan 2023 08:34:33 -0500 Fixes . * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argumen= t. Filter out native inputs from the values in GUIX_PYTHONPATH. --- Changes in v3: - Rebase Changes in v2: - Add missing copyright line - Rework wrap phase to avoid removing inputs found in both native-inputs an= d inputs - Enclose wrap computations in an 'unless' form and streamline guix/build/pyproject-build-system.scm | 39 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-b= uild-system.scm index a66c1fb34a..9da86bfc54 100644 --- a/guix/build/pyproject-build-system.scm +++ b/guix/build/pyproject-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2021 Lars-Dominik Braun ;;; Copyright =C2=A9 2022 Marius Bakke +;;; Copyright =C2=A9 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -445,7 +446,7 @@ (define* (add-install-to-pythonpath #:key native-inputs= outputs "A phase that just wraps the 'add-installed-pythonpath' procedure." (add-installed-pythonpath native-inputs outputs)) =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)) @@ -458,20 +459,28 @@ (define bindirs (string-append dir "/sbin")))) outputs)) =20 - ;; Do not require "guile" to be present in the package inputs - ;; even when there is nothing to wrap. - ;; Also, calculate (guile) only once to prevent some I/O. - (define %guile (delay (search-input-file inputs "bin/guile"))) - (define (guile) (force %guile)) - - (let* ((var `("GUIX_PYTHONPATH" prefix - ,(search-path-as-string->list - (or (getenv "GUIX_PYTHONPATH") ""))))) - (for-each (lambda (dir) - (let ((files (list-of-files dir))) - (for-each (cut wrap-script <> #:guile (guile) var) - files))) - bindirs))) + (unless (null? bindirs) + (let* ((guile (search-input-file inputs "bin/guile")) + (native-input-dirs (match native-inputs + (((_ . dir) ...) + dir))) + (input-dirs (match inputs + (((_ . dir) ...) + dir))) + (build-inputs (lset-difference string=3D? native-input-dirs + input-dirs)) + ;; A build input is an input listed in native-inputs and NOT in + ;; inputs. + (build-input? (lambda (x) + (any (cut string-prefix? <> x) build-inputs))) + (var `("GUIX_PYTHONPATH" prefix + ,(remove build-input? (search-path-as-string->list + (or (getenv "GUIX_PYTHONPATH") ""= )))))) + (for-each (lambda (dir) + (let ((files (list-of-files dir))) + (for-each (cut wrap-script <> #:guile guile var) + files))) + bindirs)))) =20 (define* (rename-pth-file #:key name native-inputs outputs #:allow-other-k= eys #:rest args) --=20 2.39.1 -------------------- End of forwarded message -------------------- --=20 Best regards, Nicolas Graves