From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aOtoJf3BxWMlswAAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 22:30:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sA2RJP3BxWPOMAEAG6o9tA (envelope-from ) for ; Mon, 16 Jan 2023 22:30:37 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 66BB83A79D for ; Mon, 16 Jan 2023 22:30:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHX3O-00076h-Tz; Mon, 16 Jan 2023 16:30:06 -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 1pHX3M-00075q-F3 for bug-guix@gnu.org; Mon, 16 Jan 2023 16:30:04 -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 1pHX3L-0007Ol-Ll for bug-guix@gnu.org; Mon, 16 Jan 2023 16:30:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHX3L-0002Ao-Gt for bug-guix@gnu.org; Mon, 16 Jan 2023 16:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#25235: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 16 Jan 2023 21:30:03 +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: 25235@debbugs.gnu.org Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org Received: via spool by 25235-submit@debbugs.gnu.org id=B25235.16739045888295 (code B ref 25235); Mon, 16 Jan 2023 21:30:03 +0000 Received: (at 25235) by debbugs.gnu.org; 16 Jan 2023 21:29:48 +0000 Received: from localhost ([127.0.0.1]:35094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHX35-00029j-PQ for submit@debbugs.gnu.org; Mon, 16 Jan 2023 16:29:48 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:41895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHX31-00029L-TT for 25235@debbugs.gnu.org; Mon, 16 Jan 2023 16:29:45 -0500 Received: by mail-qv1-f49.google.com with SMTP id d13so20339231qvj.8 for <25235@debbugs.gnu.org>; Mon, 16 Jan 2023 13:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1fShds0FnAGB0b0tpRpXTWv8vzswKaELzArduNswS10=; b=RvMe8Fi2+mSZx7LoYOjywypGBBNLX02jxdxCNRo2DH/LdBdplvAU/o3z/j8VDE+E7+ Nr8RGtAw7LLooaDelf77pe80OqWp+LP7QBeOULCmfisymmzr6mLG/Zk2e3lX4DVQnEhs 22USs6tR3kmfOfsfHsANJn69fv20GfIg/Af0wcq9XiWDDZKDQkFQE0jxdiHp4ssGKjdH iwdDg05Yn3vT0ChXy3PF053F0YM4scyHC+PwDaULbJMB34BTwP4bxhPhBvuW7PHWTHmN 9WyA0fcnSCiFR5c31mQoFinjDusajfA15yKciNxV3O1vkv2nfeniW4HdoA0cXbOj/as+ B6SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1fShds0FnAGB0b0tpRpXTWv8vzswKaELzArduNswS10=; b=npSnFQBm+RIMzzG50VZawrMj7eDSseJfb9Ug53uFCPzL8fTmSWylOdlQ8VgIun1Nje Wha1OGEq0F6PRy08HZJ25l5LpvgC80f8NyXUi3tcrB5GJ2moUed7m2kN/sQdWSBOjtq+ /PDwlO71o+qZc298aGRRSumHh74p3xRczrMAdomtvLJ7+fjSrk7sOwgtv7/z+Mm3KX9O Vc2x2FQa8KerK414lqKtxSbYQiTBg/kbihzqyhCaUoHUGEc0X6mukVNSzxA4XHCHpjR7 1sYWQ6XZgujsx6oCnrR8X0LE+Wco2myRosDbuWP3G9b+o6ezIRXhE4e61AelRrwAiQyx k+lA== X-Gm-Message-State: AFqh2kqYIYOSwAOPRl0P0rjRoZ/fUX9k2CaUmUNAk+sVtQ2kF7PKgV1c 32yiNEOGap4EhdHlwU7W8coAHDosDgEkDPU3 X-Google-Smtp-Source: AMrXdXuxvtichXMlIGkZFTGf/1UB0ikDONjv4cWoiqtlBt60/fntXhSUXtjNKGeaBD+4Kh+o2tHyTA== X-Received: by 2002:a05:6214:310f:b0:4c7:9ef7:68b3 with SMTP id ks15-20020a056214310f00b004c79ef768b3mr457915qvb.19.1673904578218; Mon, 16 Jan 2023 13:29:38 -0800 (PST) Received: from localhost.localdomain (dsl-10-130-209.b2b2c.ca. [72.10.130.209]) by smtp.gmail.com with ESMTPSA id c5-20020a05620a268500b006e8f8ca8287sm14169995qkp.120.2023.01.16.13.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 13:29:37 -0800 (PST) From: Maxim Cournoyer Date: Mon, 16 Jan 2023 16:29:19 -0500 Message-Id: <20230116212920.9641-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230116212920.9641-1-maxim.cournoyer@gmail.com> References: <20230116212920.9641-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RvMe8Fi2; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673904637; a=rsa-sha256; cv=none; b=tSV3Zp+FYXidI2rwZ+tXfkCBLYSzQw1qQgXSHpB5cbmuCBaysfdPQS6rtaB9Fp8wFFwO8H WLgMNThO9BBi87Bv80B9adpnJJ1LoQgb5PwGC/boGpDAvJjSvqb1fwSOwyB27vtDHRpI+y lNvGpY48/rUp3fnc2tKSBhjvkuA1F9IcQgOMm3QJf+oyhtGZ8GjcsytvYRrnQz9lNN3Clx VAdWJwh2DA2CbFdtaF1UlA5JwQ/GwnJdoXs2+BTTlQHqrFdJURof7lT6Zmc5/Js0LeSSIO SzHB63cBqX4eXRXmQlOi4ETDvrHaEaqzMuV1+syrpaDCGiwfcUhUWkCPl9SAxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673904637; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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:dkim-signature; bh=1fShds0FnAGB0b0tpRpXTWv8vzswKaELzArduNswS10=; b=d5gXmHcNuYDY4CM0hbCmfor71P9RqcHK+jC/CMaJdz9NXZNeIhMEdu42QfeWNwNOF+bbA+ seT1YXOsa0SLECXHpNMcOPaFykLIxpK+zkkRiynW7Dbp96I6Ja3phViO6XyoWTl+vxyVUK Znxf1ZCF1DDA4IdO1pKFTDn+EUDZUPgJ2qGQptQckVMN0JL8BBubuMMMq+5BBKHec9UTB6 0H8Q4TvG2FeOl5rCX/wWwglSofcdnbuS/8QnVwlcQ3ym9Ccwt3jZLj6jsUGp3wspN6iUn0 idu6uCqmx4cj/XCIp+MHahVoLl9j/s07fGPCnsUuMdMg8E2CsCt11DK4dTWM7Q== X-Migadu-Queue-Id: 66BB83A79D X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=RvMe8Fi2; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Spam-Score: 0.47 X-Spam-Score: 0.47 X-TUID: ImAbC68Z5+TW Fixes . * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argument. Filter out native inputs from the values in GUIX_PYTHONPATH. --- 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-inputs outputs "A phase that just wraps the 'add-installed-pythonpath' procedure." (add-installed-pythonpath native-inputs outputs)) -(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)) - (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-dirs))) + (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) -- 2.38.1