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 +LsxGl/Bx2NjCgEAbAwnHQ (envelope-from ) for ; Wed, 18 Jan 2023 10:52:31 +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 uLoyGV/Bx2NcWgAAG6o9tA (envelope-from ) for ; Wed, 18 Jan 2023 10:52:31 +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 0A9A0115CB for ; Wed, 18 Jan 2023 10:52:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pI56x-0005vS-Qs; Wed, 18 Jan 2023 04:52:03 -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 1pI56w-0005vF-Bx for bug-guix@gnu.org; Wed, 18 Jan 2023 04:52:02 -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 1pI56v-00058V-Uf for bug-guix@gnu.org; Wed, 18 Jan 2023 04:52:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pI56v-0003xS-QU for bug-guix@gnu.org; Wed, 18 Jan 2023 04:52:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#25235: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 18 Jan 2023 09:52:01 +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, ludo@gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org Received: via spool by 25235-submit@debbugs.gnu.org id=B25235.167403548715171 (code B ref 25235); Wed, 18 Jan 2023 09:52:01 +0000 Received: (at 25235) by debbugs.gnu.org; 18 Jan 2023 09:51:27 +0000 Received: from localhost ([127.0.0.1]:39228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI56N-0003wd-ER for submit@debbugs.gnu.org; Wed, 18 Jan 2023 04:51:27 -0500 Received: from mail-ej1-f50.google.com ([209.85.218.50]:42733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI56K-0003wP-JZ for 25235@debbugs.gnu.org; Wed, 18 Jan 2023 04:51:26 -0500 Received: by mail-ej1-f50.google.com with SMTP id bk15so24337898ejb.9 for <25235@debbugs.gnu.org>; Wed, 18 Jan 2023 01:51:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=q/8lAQEPlvuDzSVycDyq7bUlUX9FldveccJRom9kEUs=; b=MEfIeMonA8yjR/yrJckhNqMAG+ZAjwJPN14cx5QmdgH9X7AbV7Z9SAzjlaGx+to8ik WJ0ktyM47K9TBqfcjOOdKA8GHdTIdiW3ZRMj0saLmhT6zlvFCiLT6SKkFX0ogaAVJq+c pWmOZPPB6JEmyw/HNbW46eijzK5VCJusWGfkZaxuDw2H+c0VVe6xcOaambsr52hUJKlu ux6yibLjbitVJbregxTB1ffPuvN5PO/AvFrnLvqbhIVbW61/kyCN4o7OkEF5D/MH79MI wdO/NZX1FlUOmsgWgwyI8ur7Eo0/FbqDT6qAd+Cp+HBfPeZiB/RaRDZKn++zKKVlnPbF XuQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=q/8lAQEPlvuDzSVycDyq7bUlUX9FldveccJRom9kEUs=; b=k/3nUcZaN0hTxZCiriosgvZTx8GB2/3Ez1FLXd1VPdKcIAWvVqRTkjLjp2IO5Fa4Iy aHKGsXvO26nCQ+iQgrlL6hZlUMGMuGxEKYV4EHAQg9FfFKMFzbf0BiiIYWkesZhUQzDw h4vJ20ydID6VBk1WFLTDCeHjfT1mVDWQFZyCGzA2sjdaVbVJYX/QmU4Yr5axFoCLRBTs 3n0UHrAWxjtp01ukNuJQBT8jAvM4PmQyv2LHY/Xh4gm88UbNZGg9xO5PQrGP7cS5hZni 9DrNCaijLTFO447xhLur3TDI8dYKVsSK00stBFBWEZKHEdw+RfN+4sGJEny8tiexJAyE FLTQ== X-Gm-Message-State: AFqh2kqdX9lU0emEBQ6VocgJecN8jaDnAUb2DnzCXR76IS4EyI88T4hT dRq2R5yttAZo0MJ9TkWF8SM= X-Google-Smtp-Source: AMrXdXsdwVHnSeDL8q/BBJlfgtBrAz4OyqT1QVqa+4nS5dO/4mx0isYr/U1lRVk6q4a7THVt3I5VNw== X-Received: by 2002:a17:907:cca4:b0:7c0:f719:838d with SMTP id up36-20020a170907cca400b007c0f719838dmr17800912ejc.36.1674035478591; Wed, 18 Jan 2023 01:51:18 -0800 (PST) Received: from localhost ([2a02:ed3:910:1100:b62e:99ff:fef0:7bc0]) by smtp.gmail.com with ESMTPSA id la19-20020a170907781300b007aee7ca1199sm14495324ejc.10.2023.01.18.01.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 01:51:17 -0800 (PST) Date: Wed, 18 Jan 2023 11:51:16 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Maxim Cournoyer , 25235@debbugs.gnu.org, arunisaac@systemreboot.net, ludo@gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org References: <20230116212920.9641-1-maxim.cournoyer@gmail.com> <20230116212920.9641-2-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nKWUuOmlXvgLyWYs" Content-Disposition: inline In-Reply-To: <20230116212920.9641-2-maxim.cournoyer@gmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 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-Seal: i=1; s=key1; d=yhetil.org; t=1674035551; a=rsa-sha256; cv=none; b=Wlibg8LRXiFgIQOVN1EJ2e18VKV/8kcvuGPTsFAq4crOwMY765M/8ax2eZ99PNGPoUKvPs OvkMCHIpXebHaD4LvwT+gXDX0IMVO5ekElIrVpxVdzVm+umXBZKczEmKbLZvf1vJ1ZqCl6 ink0yg9AMufhrz+a48J+zYrh8aW2Nwsh8Md4GjYoW8Y01JeaTNiWEIZGuE2d0R+S9+ou40 DegKNLTpr1ndYp8DHiGlPa9pm+sxdWcAwbangEXT/7Dm7AUWyj3SUNvARgIz9PS+pfKunG mUnebQedp7fKVH7p1Q/8BhmxyHx517V0VISOZ7xLb4c4HsG9NgYtaS6nHhe4Gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MEfIeMon; dmarc=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674035551; 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: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=q/8lAQEPlvuDzSVycDyq7bUlUX9FldveccJRom9kEUs=; b=TUhEIZFeo6B2C+zLPkb3D//IQ23B73mGl+EP3xUtm2OvV3D0028DEZ+orxnyplAfq7pIR6 Pjq3DdmKzMQ42qe9L+2qKfFlrBnR4u1ivRmDU3HUii3PqMs2rGoK2DmopZGdClnPftN+bw 3dMcHiN1817/jyNwXdhLdIn+VXLvmIGrDyUhlHeRXk1euIMMT6/7vyJTpjuYSt00owAlXg rJOav+un089GN9F4qoqaNQ0MrVJjyZ/ggF/C43vWx31or9wWZzYohGD4PNvZDlJwi2HfX3 eToP/E0l1TsdKXVvEmSO7UYU9o/jO75xaP0QU/4cX5hIQpjomjMrv4DFKaNGQQ== X-Spam-Score: 1.47 X-Migadu-Queue-Id: 0A9A0115CB Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MEfIeMon; dmarc=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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: 1.47 X-TUID: V35URITj+tuK --nKWUuOmlXvgLyWYs Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm still on my first cup of coffee... If a python input is in inputs and in native-inputs would it be included in the wrapper or not? At first glance I'd say no. Does the search path do deduplication? If it doesn't then it'd work to only remove the first instance matching from native-input-dirs. On Mon, Jan 16, 2023 at 04:29:19PM -0500, Maxim Cournoyer wrote: > Fixes . >=20 > * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argum= ent. > Filter out native inputs from the values in GUIX_PYTHONPATH. >=20 > --- >=20 > guix/build/pyproject-build-system.scm | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) >=20 > 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 > -(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 > - (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") "")))))) > (for-each (lambda (dir) > (let ((files (list-of-files dir))) > (for-each (cut wrap-script <> #:guile (guile) var) > --=20 > 2.38.1 >=20 >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --nKWUuOmlXvgLyWYs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmPHwRQACgkQQarn3Mo9 g1HZ0xAAhDHP3k2Q7DRb2PwIRbL5Yf22B7MnuVHWl3+lYPmtenu0uj4e2/FuP08f qMhrOKUzXeP8jmAgk7yNd8OutsUfjkDML4ZezdCh0lZpw5fUokIaIGeNUCEH54Wi TNLqpzatCMtFaORf30np/aEholzhkYRXy6JciUiapeTd0A5AtBq9GmuDrviRpq6C NlKgBM7e4tBA7kBiHtrkhO9qPjC+PV7hoFJ8CVzFc3piXPgz0tH1IkB3pCtyHEfn FGJL/g2hooIcdZ5n2T3WLOSnhf/zavlHSzv3vodb8lR6H+GxO0HS9ouQICXk+L/s oThlqwoZk5yDfD9sE8gGZtSx5R5qoIOUSc62YmB0SdQ/ntrn/yruLQovbmL4VhMa qcS55HsX/R5egfXvMILf9NSTCla03KtuMamKx+3RXL5vjkDKLMHyqoAdnrnGpARk TLCvoxL8lu7Fc2kkJp2J6DQBMtbCOhpRxg3UOiCBbPutcfVOF9YFujF07eKAAw+3 GHYJWZkPKFudc6a1YY4FapZYudXGW6BFS2PrFPQ0viebjD59/oot31q7tSwYG+eE B1gERew5jypMiftc9ND+pnho4MnAA5hErAKsiWVKNwsnE5oVwlSVW56PpiwepcEw 0GRjndBFQ81cLJQgg0nqcRlYrtLjLZ+hUhgRUrmmrouOyBDbEhQ= =+g65 -----END PGP SIGNATURE----- --nKWUuOmlXvgLyWYs--