From unknown Thu Jun 12 08:33:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25235 <25235@debbugs.gnu.org> To: bug#25235 <25235@debbugs.gnu.org> Subject: Status: Wrapped python programs get native-inputs in PYTHONPATH Reply-To: bug#25235 <25235@debbugs.gnu.org> Date: Thu, 12 Jun 2025 15:33:55 +0000 retitle 25235 Wrapped python programs get native-inputs in PYTHONPATH reassign 25235 guix submitter 25235 Marius Bakke severity 25235 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 19 18:29:13 2016 Received: (at submit) by debbugs.gnu.org; 19 Dec 2016 23:29:13 +0000 Received: from localhost ([127.0.0.1]:48070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJ7Mn-0004MJ-9v for submit@debbugs.gnu.org; Mon, 19 Dec 2016 18:29:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJ7Mm-0004M2-2X for submit@debbugs.gnu.org; Mon, 19 Dec 2016 18:29:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJ7Mf-0007VR-NF for submit@debbugs.gnu.org; Mon, 19 Dec 2016 18:29:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:32872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cJ7Mf-0007VG-Ji for submit@debbugs.gnu.org; Mon, 19 Dec 2016 18:29:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJ7Me-0006D3-Ko for bug-guix@gnu.org; Mon, 19 Dec 2016 18:29:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJ7Mb-0007Rw-FJ for bug-guix@gnu.org; Mon, 19 Dec 2016 18:29:04 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:40546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cJ7Mb-0007RF-9w for bug-guix@gnu.org; Mon, 19 Dec 2016 18:29:01 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BB0EB2085A for ; Mon, 19 Dec 2016 18:29:00 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Mon, 19 Dec 2016 18:29:00 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=eIh ERZveswgFBtcv9k0qH5Y63Hg=; b=sTaGRlZMi6nSc30XefjYXJIpSN1rWROEUFf c5PXXR2uEl2bExh3x4MJSEpU6rBMRain5WLXqVL6F9ROLbqQpQ/PmIIZQOW9UhPP 1FUWvh+bWX39tVWHEplRDJKRPWz8A2qF3vhtEajgteczUdt2iwJr13Maav5afeaS ZI4PfgFw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=smtpout; bh=eIhERZveswgFBtcv9k0qH5Y63Hg=; b=lmUDy 45vrlkE7yV2me2T53+8VJSt9GqbudhykNZvTCC25odCCfIFz3RbGzOUqO+BYsEW8 4QkfszqauzQ7jfppc4ALwajeX/tSV/tmCSprdJcozmvjSJ6O2B567y53WSvIRGK+ eRJQ+lrCyI8LAUWcbS6Cpx6RSzaotZ3WwiItz8= X-ME-Sender: X-Sasl-enc: ZU5Hum8tIJSHKl7Ti3N7qRqTmSjq9rZqb7DWJwcvCBI/ 1482190140 Received: from localhost (128.92-221-147.customer.lyse.net [92.221.147.128]) by mail.messagingengine.com (Postfix) with ESMTPA id 53A1C7E7C5 for ; Mon, 19 Dec 2016 18:29:00 -0500 (EST) From: Marius Bakke To: bug-guix@gnu.org Subject: Wrapped python programs get native-inputs in PYTHONPATH User-Agent: Notmuch/0.23.3 (https://notmuchmail.org) Emacs/25.1.1 (x86_64-unknown-linux-gnu) Date: Tue, 20 Dec 2016 00:28:58 +0100 Message-ID: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) --=-=-= Content-Type: text/plain The 'wrap' phase of 'python-build-system' adds native-inputs to PYTHONPATH of the wrapped programs. This causes unnecessary runtime dependencies and may create problems when cross-compiling. Given that all python dependencies are now supposed to be propagated, perhaps we can simply remove the wrap phase? It only touches PYTHONPATH. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhYbToACgkQoqBt8qM6 VPrqCgf9ET1NPk/I7q7M1zPHlbqOOrYWkk2fS7RAH3Un/X33Vve1DzKWsj7OQ7LO YdU8ME0f8wJZ+tILUMawNRt/lKs/CmHug+9aOcqSfN7O8jawFVXxEPIE4U5wCM72 pMwhbu5TwRUZACD7G1168U257uyHpir26rf3wypbzWeAJFr50LEfxbPeBXjsR81v YPYUUeJ1tCR1DedtU0Ih4TK8eW1ipveYMyw1iT9W+OMFO+y8qZwy1NyRNSrHgOcM Ur/rmMqjJc+Yhvf37effW6Jg8OODBsqZzocVVqtvetk6Uo7S3jKKFu+Ov+SKyvSJ FKNV5SC+DFxHSbdG2i35yMit8bGMcA== =Ed8O -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 20 09:01:04 2016 Received: (at 25235) by debbugs.gnu.org; 20 Dec 2016 14:01:04 +0000 Received: from localhost ([127.0.0.1]:48354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJKyW-0001Ca-Co for submit@debbugs.gnu.org; Tue, 20 Dec 2016 09:01:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJKyV-0001C1-DS for 25235@debbugs.gnu.org; Tue, 20 Dec 2016 09:01:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJKyL-0001oQ-8r for 25235@debbugs.gnu.org; Tue, 20 Dec 2016 09:00:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJKyL-0001oM-5c; Tue, 20 Dec 2016 09:00:53 -0500 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:45204 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cJKyK-000519-HI; Tue, 20 Dec 2016 09:00:52 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Marius Bakke Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 Frimaire an 225 de la =?utf-8?Q?R=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-unknown-linux-gnu Date: Tue, 20 Dec 2016 15:00:50 +0100 In-Reply-To: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> (Marius Bakke's message of "Tue, 20 Dec 2016 00:28:58 +0100") Message-ID: <87y3zahf8t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.1 (--------) X-Debbugs-Envelope-To: 25235 Cc: 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.1 (--------) Marius Bakke skribis: > The 'wrap' phase of 'python-build-system' adds native-inputs to > PYTHONPATH of the wrapped programs. This causes unnecessary runtime > dependencies and may create problems when cross-compiling. > > Given that all python dependencies are now supposed to be propagated, > perhaps we can simply remove the wrap phase? It only touches PYTHONPATH. We cannot simply remove it: it is meant for packages that provide standalone programs, such as =E2=80=98certbot=E2=80=99. For these, it auto= matically wraps bin/* and we don=E2=80=99t even have to have propagated inputs, which= is pretty cool. However, you are right that native inputs shouldn=E2=80=99t be there. Prob= ably we need to add some filtering in the =E2=80=98wrap=E2=80=99 phase? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 26 13:26:19 2016 Received: (at 25235) by debbugs.gnu.org; 26 Dec 2016 18:26:19 +0000 Received: from localhost ([127.0.0.1]:55927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLZyU-0004Iq-Sd for submit@debbugs.gnu.org; Mon, 26 Dec 2016 13:26:19 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cLZyR-0004Ig-Ci for 25235@debbugs.gnu.org; Mon, 26 Dec 2016 13:26:17 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 325EC20A64; Mon, 26 Dec 2016 13:26:10 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Mon, 26 Dec 2016 13:26:10 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=famulari.name; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=WuszWWb4jeCxJcb /mXr2TuDxcPI=; b=OcY32HpebZrY7IUKgQiScwJevQx2BN5ntGYNFsJNQTbCyIk OYOg7oHEvmhXk8UiGlr4y3q1PiMiuM5DXM+YVJBvp/tvGWNUKCG9t00KuMXdyo2Y AZPJiPWpxbR9BmlzpLV/5ysnV93w/e/SnJqBFiV0o5jmhusgUd1aIEGRQLVg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=WuszWWb4jeCxJcb/mXr2TuDxcPI=; b=esTVcpGVdlmTUt5+uV+q xcgktUp+/3G/S9eN42mh2PW7vBl4bIAWPyy+yOIOnf4xMHnUXBdNVWuFHoIxLN70 uzkfZxiUFO3GnGoJ/PgtUXZIn1VQ7mtI4hLDFSl8yV0z8OaG02K5hKQGgqC9nwWL CdsVCRCdIZKhgom8dR4gDuI= X-ME-Sender: X-Sasl-enc: U1vVeIbaBCr7683Sb4p1GrBQdoomk3XTre8juMck8W6q 1482776769 Received: from localhost (c-76-110-75-179.hsd1.fl.comcast.net [76.110.75.179]) by mail.messagingengine.com (Postfix) with ESMTPA id D7BF57E808; Mon, 26 Dec 2016 13:26:09 -0500 (EST) Date: Mon, 26 Dec 2016 13:26:08 -0500 From: Leo Famulari To: Ludovic =?iso-8859-1?Q?Court=E8s?= Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH Message-ID: <20161226182608.GA20609@jasmine> References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87y3zahf8t.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87y3zahf8t.fsf@gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25235 Cc: Marius Bakke , 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Tue, Dec 20, 2016 at 03:00:50PM +0100, Ludovic Courtès wrote: > Marius Bakke skribis: > > > The 'wrap' phase of 'python-build-system' adds native-inputs to > > PYTHONPATH of the wrapped programs. This causes unnecessary runtime > > dependencies and may create problems when cross-compiling. > > > > Given that all python dependencies are now supposed to be propagated, > > perhaps we can simply remove the wrap phase? It only touches PYTHONPATH. > > We cannot simply remove it: it is meant for packages that provide > standalone programs, such as ‘certbot’. For these, it automatically > wraps bin/* and we don’t even have to have propagated inputs, which is > pretty cool. > > However, you are right that native inputs shouldn’t be there. Probably > we need to add some filtering in the ‘wrap’ phase? While looking at the beets package definition with fresh eyes, I realize that it will surely break once this change is made. So it will make a good test case for this improvement :) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 29 07:27:24 2017 Received: (at 25235) by debbugs.gnu.org; 29 Mar 2017 11:27:24 +0000 Received: from localhost ([127.0.0.1]:50196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctBl6-00049f-9S for submit@debbugs.gnu.org; Wed, 29 Mar 2017 07:27:24 -0400 Received: from o129.p9.mailjet.com ([87.253.234.129]:57583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@bnc3.mailjet.com>) id 1ctBl3-00049T-TX for 25235@debbugs.gnu.org; Wed, 29 Mar 2017 07:27:22 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=mOP8mZgF8cxkXmCe9d94116udM4=; b=ZQXB/b3E08y4v0stxVsTM/6T8ZcbcVw4GH7mkgIPpHrTRGt6xUc2mZV9W 1ET28wmL93lx6AQrUPPWMLQ0WL9BxB839IfltYemQFdEubFxe/TqBl5g7HAT hhNdhJjfbHq7HZiCAIQbeQ0HBx45SEvnHQTH2BdVyV4eBBO8YkQtn0= Message-Id: <716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@mailjet.com> MIME-Version: 1.0 From: Arun Isaac To: 25235@debbugs.gnu.org Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH Date: Wed, 29 Mar 2017 16:57:12 +0530 In-reply-to: <20161226182608.GA20609@jasmine> References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87y3zahf8t.fsf@gnu.org> <20161226182608.GA20609@jasmine> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY43C3jtBKSeWP-YxIpLgSTQAFgUc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25235 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) I'm working on fixing this bug. I have modified guix/build/python-build-system.scm for the same. In particular, I have added #:use-module (guix packages) because I need the functions `package-name' and `package-transitive-target-inputs'. But, when I try building any python-build-system package with something like "./pre-inst-env guix build scons", I get a ("no code for module" (guix packages)) error. What am I missing? Full backtrace follows: Backtrace: In ice-9/eval.scm: 432: 19 [eval # ()] In system/base/compile.scm: 152: 18 [compile-file "/gnu/store/38rxls2y8v8zjva7xq7zv99rv6c81bq3-module-= import/guix/build/python-build-system.scm" ...] 43: 17 [call-once #] In ice-9/boot-9.scm: 174: 16 [with-throw-handler #t ...] In system/base/compile.scm: 59: 15 [#] 155: 14 [# #] 218: 13 [read-and-compile # ...] 234: 12 [lp () #f #] 182: 11 [lp (#) (define-module # # .= ..) ...] In ice-9/boot-9.scm: 2404: 10 [save-module-excursion #] In language/scheme/compile-tree-il.scm: 31: 9 [#= ] In ice-9/psyntax.scm: 1106: 8 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...] 989: 7 [scan ((define-module # # # ...)) () ((top)) ...] 279: 6 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...] In ice-9/eval.scm: 411: 5 [eval # ()] In ice-9/boot-9.scm: 2954: 4 [define-module* (guix build python-build-system) #:filename ...] 2929: 3 [resolve-imports ((# # gnu:) (#) (#) (#) ...)] 2870: 2 [resolve-interface (guix packages) #:select ...] In unknown file: ?: 1 [scm-error misc-error #f "~A ~S" ("no code for module" (guix packag= es)) #f] In ice-9/boot-9.scm: 109: 0 [# mi= sc-error ...] ice-9/boot-9.scm:109:20: In procedure #: ice-9/boot-9.scm:109:20: no code for module (guix packages) builder for `/gnu/store/lsrxzd1hdsgpb9zhrdv02dsxihpmxmww-module-import-comp= iled.drv' failed with exit code 1 @ build-failed /gnu/store/lsrxzd1hdsgpb9zhrdv02dsxihpmxmww-module-import-co= mpiled.drv - 1 builder for `/gnu/store/lsrxzd1hdsgpb9zhrdv02dsxihpmxmww-mod= ule-import-compiled.drv' failed with exit code 1 cannot build derivation `/gnu/store/pm2r6cbcfij8d7nzdxkzqx1dq880mhg8-scons-= 2.3.4.drv': 1 dependencies couldn't be built guix build: error: build failed: build of `/gnu/store/pm2r6cbcfij8d7nzdxkzq= x1dq880mhg8-scons-2.3.4.drv' failed = From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 30 11:30:41 2017 Received: (at 25235) by debbugs.gnu.org; 30 Mar 2017 15:30:41 +0000 Received: from localhost ([127.0.0.1]:53085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctc24-0005nN-Hk for submit@debbugs.gnu.org; Thu, 30 Mar 2017 11:30:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctc22-0005nB-UK for 25235@debbugs.gnu.org; Thu, 30 Mar 2017 11:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctc1t-0003Id-2n for 25235@debbugs.gnu.org; Thu, 30 Mar 2017 11:30:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctc1s-0003IX-VV; Thu, 30 Mar 2017 11:30:29 -0400 Received: from [193.50.110.231] (port=40954 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ctc1s-0003zy-C2; Thu, 30 Mar 2017 11:30:28 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arun Isaac Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87y3zahf8t.fsf@gnu.org> <20161226182608.GA20609@jasmine> <716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@mailjet.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Germinal an 225 de la =?utf-8?Q?R=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-unknown-linux-gnu Date: Thu, 30 Mar 2017 17:30:25 +0200 In-Reply-To: <716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@mailjet.com> (Arun Isaac's message of "Wed, 29 Mar 2017 16:57:12 +0530") Message-ID: <87o9wiwzn2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25235 Cc: 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Arun Isaac skribis: > I'm working on fixing this bug. I have modified > guix/build/python-build-system.scm for the same. In particular, I have > added #:use-module (guix packages) because I need the functions > `package-name' and `package-transitive-target-inputs'. But, when I try > building any python-build-system package with something like > "./pre-inst-env guix build scons", I get a ("no code for module" (guix > packages)) error. What am I missing? > > Full backtrace follows: [...] > 2954: 4 [define-module* (guix build python-build-system) #:filename ...] > 2929: 3 [resolve-imports ((# # gnu:) (#) (#) (#) ...)] > 2870: 2 [resolve-interface (guix packages) #:select ...] > In unknown file: > ?: 1 [scm-error misc-error #f "~A ~S" ("no code for module" (guix pack= ages)) #f] =E2=80=9CBuild-side=E2=80=9D modules, which typically live in (guix build = =E2=80=A6), should not depend on =E2=80=9Chost-side=E2=80=9D modules such as (guix packages). Tha= t=E2=80=99s because if we did that, we=E2=80=99d effectively end up importing all of Guix on the build side, but then we=E2=80=99d also have to serialize data structures su= ch as packages to pass them from one side to the other. (I hope this makes sense to you, but if it doesn=E2=80=99t maybe the intro of can shed some light.) So in short, we cannot use =E2=80=98package-name=E2=80=99 and =E2=80=98package-transitive-target-inputs=E2=80=99 in this module. (Time passes=E2=80=A6) I wasn=E2=80=99t sure how to fix this bug myself so I gave it a try and end= ed up with the patch below, but I haven=E2=80=99t tested in detail. (You=E2=80= =99ll notice (guix build-system python) is hard to work with because it doesn=E2=80=99t = use gexps yet.) How does it look? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 17173f121..a05fd5a79 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -153,7 +153,7 @@ pre-defined variants." #:rest arguments) "Return a bag for NAME." (define private-keywords - '(#:source #:target #:python #:inputs #:native-inputs)) + '(#:source #:target #:python #:inputs)) =20 (and (not target) ;XXX: no cross-compilati= on (bag @@ -174,6 +174,9 @@ pre-defined variants." =20 (define* (python-build store name inputs #:key + (native-inputs '()) + ;; TODO: Something like this: + ;; (disallowed-references native-inputs) (tests? #t) (test-target "test") (use-setuptools? #t) @@ -189,17 +192,24 @@ pre-defined variants." (guix build utils)))) "Build SOURCE using PYTHON, and with INPUTS. This assumes that SOURCE provides a 'setup.py' file as its build system." + (define canonicalize-reference + (match-lambda + (((? derivation? source)) + (derivation->output-path source)) + (((? package? package)) + (derivation->output-path + (package-derivation store package system))) + ((source) + source) + (source + source))) + (define builder `(begin (use-modules ,@modules) (python-build #:name ,name - #:source ,(match (assoc-ref inputs "source") - (((? derivation? source)) - (derivation->output-path source)) - ((source) - source) - (source - source)) + #:source ,(canonicalize-reference + (assoc-ref inputs "source")) #:configure-flags ,configure-flags #:system ,system #:test-target ,test-target @@ -209,7 +219,17 @@ provides a 'setup.py' file as its build system." #:outputs %outputs #:search-paths ',(map search-path-specification->sexp search-paths) - #:inputs %build-inputs))) + #:inputs %build-inputs + + ;; We call them "native inputs" but there's no + ;; cross-compilation here, so that really means + ;; "build-time-only" inputs, things should not be + ;; run-time dependencies. + #:native-inputs ',(map (match-lambda + ((name . rest) + `(,name + . ,(canonicalize-referenc= e rest)))) + native-inputs)))) =20 (define guile-for-build (match guile @@ -222,6 +242,8 @@ provides a 'setup.py' file as its build system." =20 (build-expression->derivation store name builder #:inputs inputs + ;; TODO: + ;; #:disallowed-references disallowed-refe= rences #:system system #:modules imported-modules #:outputs outputs diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-s= ystem.scm index dd07986b9..1ca26104b 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2013, 2015, 2016 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2013, 2015, 2016, 2017 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2013 Andreas Enge ;;; Copyright =C2=A9 2013 Nikita Karetnikov ;;; Copyright =C2=A9 2015 Mark H Weaver @@ -184,7 +184,7 @@ when running checks after installing the package." configure-flags))) (call-setuppy "install" params use-setuptools?))) =20 -(define* (wrap #:key inputs outputs #:allow-other-keys) +(define* (wrap #:key native-inputs inputs outputs #:allow-other-keys) (define (list-of-files dir) (map (cut string-append dir "/" <>) (or (scandir dir (lambda (f) @@ -199,14 +199,27 @@ when running checks after installing the package." (string-append dir "/sbin")))) outputs)) =20 + (define build-time-inputs + ;; Built-time-only dependencies. + (match native-inputs + (((names . directories) ...) + directories))) + + (define (build-time-dependency? item) + (any (cut string-prefix? <> item) + build-time-inputs)) + + ;; Wrap binaries such that PYTHONPATH is set appropriately, but remove + ;; build-time-only dependencies (aka. #:native-inputs) from the search p= ath. (let* ((out (assoc-ref outputs "out")) (python (assoc-ref inputs "python")) + (path (search-path-as-string->list + (or (getenv "PYTHONPATH") ""))) (var `("PYTHONPATH" prefix ,(cons (string-append out "/lib/python" (get-python-version python) "/site-packages") - (search-path-as-string->list - (or (getenv "PYTHONPATH") "")))))) + (remove build-time-dependency? path))))) (for-each (lambda (dir) (let ((files (list-of-files dir))) (for-each (cut wrap-program <> var) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 30 15:08:18 2017 Received: (at 25235) by debbugs.gnu.org; 30 Mar 2017 19:08:18 +0000 Received: from localhost ([127.0.0.1]:53205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctfQg-0002rn-L8 for submit@debbugs.gnu.org; Thu, 30 Mar 2017 15:08:18 -0400 Received: from o116.p8.mailjet.com ([87.253.233.116]:56825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ctfQe-0002re-Lh for 25235@debbugs.gnu.org; Thu, 30 Mar 2017 15:08:17 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=zYw9lCeJI0Hmm7eiau4pp9KnQds=; b=YHajnAA2KQzZRSl6jFcv/uju9ZcFUtjrNKdUEyJiTYIb89td5LzKPOTjf pLj7pa41EsJObO8XOqYmSlrdPzUPlyCeNM+yw/UB2NOEMgPq8hu4zyFlDJzS IAfvpqugd04/4CONUlowbjLHMaxCeN6N5f+mGisZbgEc9cMJS/s+8I= Message-Id: MIME-Version: 1.0 From: Arun Isaac To: 25235@debbugs.gnu.org Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH Date: Fri, 31 Mar 2017 00:37:53 +0530 In-reply-to: <87o9wiwzn2.fsf@gnu.org> References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87y3zahf8t.fsf@gnu.org> <20161226182608.GA20609@jasmine> <716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@mailjet.com> <87o9wiwzn2.fsf@gnu.org> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEMAIlnS11YAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY3VefENX27K-NTeG0Ib8F8zoFLAAFgUc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > “Build-side” modules, which typically live in (guix build …), should not > depend on “host-side” modules such as (guix packages). That’s because > if we did that, we’d effectively end up importing all of Guix on the > build side, but then we’d also have to serialize data structures such as > packages to pass them from one side to the other. (I hope this makes > sense to you, but if it doesn’t maybe the intro of > can > shed some light.) [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [87.253.233.116 listed in list.dnswl.org] 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 25235 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > “Build-side” modules, which typically live in (guix build …), should not > depend on “host-side” modules such as (guix packages). That’s because > if we did that, we’d effectively end up importing all of Guix on the > build side, but then we’d also have to serialize data structures such as > packages to pass them from one side to the other. (I hope this makes > sense to you, but if it doesn’t maybe the intro of > can > shed some light.) [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [87.253.233.116 listed in list.dnswl.org] 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid > “Build-side” modules, which typically live in (guix build …), should not > depend on “host-side” modules such as (guix packages). That’s because > if we did that, we’d effectively end up importing all of Guix on the > build side, but then we’d also have to serialize data structures such as > packages to pass them from one side to the other. (I hope this makes > sense to you, but if it doesn’t maybe the intro of > can > shed some light.) It makes some sense, but I'll read up more. > So in short, we cannot use ‘package-name’ and > ‘package-transitive-target-inputs’ in this module. Ok. > (Time passes…) > > I wasn’t sure how to fix this bug myself so I gave it a try and ended up > with the patch below, but I haven’t tested in detail. (You’ll notice > (guix build-system python) is hard to work with because it doesn’t use > gexps yet.) > > How does it look? I'm travelling now. I'll get back on Monday and study this patch. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 04 13:02:41 2017 Received: (at 25235) by debbugs.gnu.org; 4 Apr 2017 17:02:41 +0000 Received: from localhost ([127.0.0.1]:60905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvRqq-00033K-Ru for submit@debbugs.gnu.org; Tue, 04 Apr 2017 13:02:41 -0400 Received: from o105.p9.mailjet.com ([87.253.234.105]:58631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvRqo-00033B-9Y for 25235@debbugs.gnu.org; Tue, 04 Apr 2017 13:02:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=itzfOyu2pxDKojpLNOfy+0BLzMU=; b=TtiODqeEl1F5P99vjofj+pao/Pl3/NGpDzQHYLIHaLADeUL1GGqlOgiu5 T2WogRjxdxkg3HIIL2SCfWr8tKXor1I7ch50rUSm5Gwrj7tkIFk/u7ai19KM gtgH7Gf1Ssg+5Nzaw+3Zw2vRIvvMn2APRpJNjtwI//873d8gSt/8Mk= Message-Id: MIME-Version: 1.0 From: Arun Isaac To: 25235@debbugs.gnu.org Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH Date: Tue, 04 Apr 2017 22:32:24 +0530 In-reply-to: <87o9wiwzn2.fsf@gnu.org> References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87y3zahf8t.fsf@gnu.org> <20161226182608.GA20609@jasmine> <716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@mailjet.com> <87o9wiwzn2.fsf@gnu.org> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEEAJFKBgTAAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY49GtFX1NsHZGTyeg7A5szfZxdQAFgUc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25235 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) > How does it look? I tried your patch. But native-inputs are still there in the wrapped PYTHONPATH. I printed out the results from various steps from the wrap phase. They are as follows: `build-time-inputs' is ("/gnu/store/5wbi6vsi12bmpzygwhys3c0cc6sjdw40-python-beautifulsoup4-4.5.3" "/gnu/store/kc5gl1j85y9ispjsgbg5f5c6jdy1k32s-python-flask-0.11.1" "/gnu/store/3ib43rpca6qzwfcav8s9ivm3dikpxq87-python-mock-1.0.1" "/gnu/store/6q4hszis7z6x44ig2zlwjwlcjy3vvfmp-python-mpd2-0.5.5" "/gnu/store/5wx6yffx6dppd2dr91qfi1jlpqlp9f5m-python-nose-1.3.7" "/gnu/store/kqjfgfwzm7sq43fnng1w23mjyr2xrd75-python-pathlib-1.0.1" "/gnu/store/b9yn8bfd43pvrp2wyinf6rf2qw113r5p-python-pyxdg-0.25" "/gnu/store/g4vfl4wy81y14fjhlpmgqh0i01cg37mb-python-pylast-1.6.0" "/gnu/store/nim5r75b1kzawln3a1bgag2f12vdmb8x-python-rarfile-2.8" "/gnu/store/wbaaacm1m7bzbhi3z3scwbz2p4pf2ybg-python-responses-0.5.1") `path' is ("/gnu/store/5wbi6vsi12bmpzygwhys3c0cc6sjdw40-python-beautifulsoup4-4.5.3/l= ib/python3.5/site-packages" "/gnu/store/r3f04sda4gh5vbsa7zb5x0ygf326cp75-python-flask-0.11.1/lib/python= 3.5/site-packages" "/gnu/store/3ib43rpca6qzwfcav8s9ivm3dikpxq87-python-mock-1.0.1/lib/python3.= 5/site-packages" "/gnu/store/5mkb6im3dijkw4f5146mjz4c49qgcklq-python-mpd2-0.5.5/lib/python3.= 5/site-packages" "/gnu/store/9z450rcsza3x448ky83fkd5636ck9aqd-python-nose-1.3.7/lib/python3.= 5/site-packages" "/gnu/store/kqjfgfwzm7sq43fnng1w23mjyr2xrd75-python-pathlib-1.0.1/lib/pytho= n3.5/site-packages" "/gnu/store/b9yn8bfd43pvrp2wyinf6rf2qw113r5p-python-pyxdg-0.25/lib/python3.= 5/site-packages" "/gnu/store/g4vfl4wy81y14fjhlpmgqh0i01cg37mb-python-pylast-1.6.0/lib/python= 3.5/site-packages" "/gnu/store/nim5r75b1kzawln3a1bgag2f12vdmb8x-python-rarfile-2.8/lib/python3= .5/site-packages" "/gnu/store/wbaaacm1m7bzbhi3z3scwbz2p4pf2ybg-python-responses-0.5.1/lib/pyt= hon3.5/site-packages" "/gnu/store/m6ir6mj7laxcwsjrz0lvxm7q04w0anhp-python-discogs-client-2.2.1/li= b/python3.5/site-packages" "/gnu/store/v3xiyw0cj08qmpn08jaiznd8ak3nvdga-python-jellyfish-0.5.6/lib/pyt= hon3.5/site-packages" "/gnu/store/pwxvvi24950x6rgvl4f46z89sbpa2b7a-python-munkres-1.0.8/lib/pytho= n3.5/site-packages" "/gnu/store/nws3867b5q78ri461wr3rdwgqzasvv2a-python-musicbrainzngs-0.6/lib/= python3.5/site-packages" "/gnu/store/wsw2nr30nhz29dww1hfjb6lgqn2ckrgy-python-mutagen-1.36/lib/python= 3.5/site-packages" "/gnu/store/n7fh268b1g1g87s4djvm672p2xmwkd5r-python-pyyaml-3.12/lib/python3= .5/site-packages" "/gnu/store/y3ncl6ia04vqdkhnhgzb3iabcsczj0zb-python-unidecode-0.04.20/lib/p= ython3.5/site-packages" "/gnu/store/alk9r3rir93pjmv8im20f8xrvv90219z-python-3.5.2/lib/python3.5/sit= e-packages" "/gnu/store/z2mmzglkykws7hc9k2sr40fidiv62cpa-python-werkzeug-0.11.15/lib/py= thon3.5/site-packages" "/gnu/store/5w60y9zyjskv179sf4pmq2kzpff887dv-python-click-6.7/lib/python3.5= /site-packages" "/gnu/store/f4qqgaql0f95alxrz9r52n3m5ahjrc1s-python-jinja2-2.8/lib/python3.= 5/site-packages" "/gnu/store/n0l3szawn661n2rjk6nnbajzzc02pmfj-python-itsdangerous-0.24/lib/p= ython3.5/site-packages" "/gnu/store/rpnfm1v7vnwxl3wpbadz2bz25s2x1bbg-python-six-1.10.0/lib/python3.= 5/site-packages" "/gnu/store/64ahrdmjmmm8id5327i5kqjj8ppvi2kl-python-cookies-2.2.1/lib/pytho= n3.5/site-packages" "/gnu/store/2iyrxbr6k1qdcrhfpv3cz1nh1znwnga5-python-requests-2.13.0/lib/pyt= hon3.5/site-packages" "/gnu/store/0c28plwcf33lnibf27h8ijig467pphiw-python-oauthlib-1.0.3/lib/pyth= on3.5/site-packages" "/gnu/store/m48bcrmrzrcb79p6dhaq0diwr3aacfq3-python-markupsafe-0.23/lib/pyt= hon3.5/site-packages") (remove build-time-dependency? path) is ("/gnu/store/r3f04sda4gh5vbsa7zb5x0ygf326cp75-python-flask-0.11.1/lib/pytho= n3.5/site-packages" "/gnu/store/5mkb6im3dijkw4f5146mjz4c49qgcklq-python-mpd2-0.5.5/lib/python3.= 5/site-packages" "/gnu/store/9z450rcsza3x448ky83fkd5636ck9aqd-python-nose-1.3.7/lib/python3.= 5/site-packages" "/gnu/store/m6ir6mj7laxcwsjrz0lvxm7q04w0anhp-python-discogs-client-2.2.1/li= b/python3.5/site-packages" "/gnu/store/v3xiyw0cj08qmpn08jaiznd8ak3nvdga-python-jellyfish-0.5.6/lib/pyt= hon3.5/site-packages" "/gnu/store/pwxvvi24950x6rgvl4f46z89sbpa2b7a-python-munkres-1.0.8/lib/pytho= n3.5/site-packages" "/gnu/store/nws3867b5q78ri461wr3rdwgqzasvv2a-python-musicbrainzngs-0.6/lib/= python3.5/site-packages" "/gnu/store/wsw2nr30nhz29dww1hfjb6lgqn2ckrgy-python-mutagen-1.36/lib/python= 3.5/site-packages" "/gnu/store/n7fh268b1g1g87s4djvm672p2xmwkd5r-python-pyyaml-3.12/lib/python3= .5/site-packages" "/gnu/store/y3ncl6ia04vqdkhnhgzb3iabcsczj0zb-python-unidecode-0.04.20/lib/p= ython3.5/site-packages" "/gnu/store/alk9r3rir93pjmv8im20f8xrvv90219z-python-3.5.2/lib/python3.5/sit= e-packages" "/gnu/store/z2mmzglkykws7hc9k2sr40fidiv62cpa-python-werkzeug-0.11.15/lib/py= thon3.5/site-packages" "/gnu/store/5w60y9zyjskv179sf4pmq2kzpff887dv-python-click-6.7/lib/python3.5= /site-packages" "/gnu/store/f4qqgaql0f95alxrz9r52n3m5ahjrc1s-python-jinja2-2.8/lib/python3.= 5/site-packages" "/gnu/store/n0l3szawn661n2rjk6nnbajzzc02pmfj-python-itsdangerous-0.24/lib/p= ython3.5/site-packages" "/gnu/store/rpnfm1v7vnwxl3wpbadz2bz25s2x1bbg-python-six-1.10.0/lib/python3.= 5/site-packages" "/gnu/store/64ahrdmjmmm8id5327i5kqjj8ppvi2kl-python-cookies-2.2.1/lib/pytho= n3.5/site-packages" "/gnu/store/2iyrxbr6k1qdcrhfpv3cz1nh1znwnga5-python-requests-2.13.0/lib/pyt= hon3.5/site-packages" "/gnu/store/0c28plwcf33lnibf27h8ijig467pphiw-python-oauthlib-1.0.3/lib/pyth= on3.5/site-packages" "/gnu/store/m48bcrmrzrcb79p6dhaq0diwr3aacfq3-python-markupsafe-0.23/lib/pyt= hon3.5/site-packages") Somehow, the paths in `build-time-inputs' are not the same as those in `path'. Notice the different hashes. Hence `remove' does not succeed in filtering them out. > + ;; TODO: Something like this: > + ;; (disallowed-references native-inputs) What is this part for? = From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 07 08:22:37 2019 Received: (at 25235) by debbugs.gnu.org; 7 Feb 2019 13:22:37 +0000 Received: from localhost ([127.0.0.1]:36643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grjdV-0007Gt-Hm for submit@debbugs.gnu.org; Thu, 07 Feb 2019 08:22:37 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grjdT-0007Gk-5T for 25235@debbugs.gnu.org; Thu, 07 Feb 2019 08:22:36 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1549545733; cv=none; d=zoho.com; s=zohoarc; b=co7STyk0T7dLmnC8AIW0wZvs/ZZx92gvT2CyrsIXW2NjVHdwJVPQOoytN+GLulQCgXA7uaBVy1b+03/Vtk4eK4dWK+vHvA03K2GOQd/+I+1FjMiNmQhqGNxWbxuS12C3gUqlCNAPYB5lPL6gBeVktP/Z44dXiVOpqKwRu0YDfQA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1549545733; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=y5kPe3X/8ldZyPB0a7Rv4WsWLM8kCCGCNn2YpGDid7w=; b=Fs+H6lV76dhKQLKfNCpoWYC1DmD+VQp0wA/DOilq4aO971MnFUvxPUYcaENinsZ07jjg/J+FpxV0HWko5QxMGntyLVswzUSp+rY+nCcklhOdhDCt2RetFtjZGNS/fWNva9hR7r0niuX5uDhK4Qaut23iVw/+u32FfRrv1yThSfY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1549545733; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:MIME-Version:Content-Type; l=338; bh=y5kPe3X/8ldZyPB0a7Rv4WsWLM8kCCGCNn2YpGDid7w=; b=Tb3r5HQTBv3n1bs13cPCSsa+FO0lDIMJ77lVsQkIDxY2nAbj8QNGiF35NcY7B41R PIA7H/eJT9+eYz/uYOEfvBYgsG+jqUgwEfj8vblrI1sN2/UchvwnGvoZqc+CaQK5N04 59EhMEqEVRNQeyw9QEsTnhgdOyCxvMRXH1zu5d6k= Received: from localhost (141.80.247.165 [141.80.247.165]) by mx.zohomail.com with SMTPS id 1549545731507933.7957690489359; Thu, 7 Feb 2019 05:22:11 -0800 (PST) From: Ricardo Wurmus To: Arun Isaac Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87y3zahf8t.fsf@gnu.org> <20161226182608.GA20609@jasmine> <716a63e7.AEQAIoR8aXkAAAAAAAAAAAOwyEEAAAACwQwAAAAAAAW9WABY25oY@mailjet.com> <87o9wiwzn2.fsf@gnu.org> Date: Thu, 07 Feb 2019 14:22:07 +0100 In-Reply-To: (Arun Isaac's message of "Tue, 04 Apr 2017 22:32:24 +0530") Message-ID: <87pns34tts.fsf@elephly.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Arun Isaac writes: >> + ;; TODO: Something like this: >> + ;; (disallowed-references native-inputs) > > What is this part for? This is to ensure that no references to any native input are retained in the output. (Think of it as an assertion that is checked at the end of the build.) ~~ Ricardo From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 06 11:56:13 2020 Received: (at 25235) by debbugs.gnu.org; 6 Apr 2020 15:56:13 +0000 Received: from localhost ([127.0.0.1]:49086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLU6f-0005nI-6H for submit@debbugs.gnu.org; Mon, 06 Apr 2020 11:56:13 -0400 Received: from sender4-of-o56.zoho.com ([136.143.188.56]:21626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jLTDD-0002jG-Nz for 25235@debbugs.gnu.org; Mon, 06 Apr 2020 10:58:56 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1586185131; cv=none; d=zohomail.com; s=zohoarc; b=eJceL2GjTqrZ3ILEhmwoCU6Xke2HNbVW4ynK6ZrVDd6pl0yDUqjgOsWqk/AbtASXS0Gwq9cO01ZVPQ1PkzwInI5SqpuVnhy5VPHtK6TQdlwFH4kp3OOSXxRO39vsugWxqlV1KdvgAO0nTLXlFnJRfnKY31rHgNZIkyWIQ5AAJYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586185131; h=Content-Type:Date:From:MIME-Version:Message-ID:To; bh=LocH6siaqHCBrtP+jlUQcyMQzyNDfprUaQxPFoCw2tY=; b=no46xjFjdEIjwmIKf6dbeCu/j5+Gy2qYl9R8AFhJX3OqW6sMK/Z7orcdEJn19DLE+cvlblkeBrcTyn0C/RkqYg/9vqA5z4Xz7IQm3NJLVxrM5c1F+MqvkPQ9Mpz+Gz7nl2N8Z6B/qs0Lpv3/ROntsFtPwK+bERQoznuqI/20T9s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=issues.guix.gnu.org@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1586185131; s=zoho; d=elephly.net; i=issues.guix.gnu.org@elephly.net; h=MIME-Version:Content-Type:From:To:Date:Message-ID; bh=LocH6siaqHCBrtP+jlUQcyMQzyNDfprUaQxPFoCw2tY=; b=d6cBaqqi7bkQ+usG9kArXCM0XyCHSOo0oE2XUjiD2X35o7KElZwphWX8aaMbhqGd JVihXixDDCFt502Fq6tb9uKeTCJXAd7rkVO7gcKcjQAVUiw3tf+7MluUZbRhdFyInoT 5B4USHCE7D5DbdNyGivovTTOkK10EikFofP2Spnc= Received: from localhost (ns3129517.ip-51-75-144.eu [51.75.144.43]) by mx.zohomail.com with SMTPS id 1586185128637539.044382257109; Mon, 6 Apr 2020 07:58:48 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 From: Ricardo Wurmus via web To: 25235@debbugs.gnu.org Date: Mon, 6 Apr 2020 16:49:07 +0200 Message-ID: <7f6e5ae41520.2159a21282e87de@guile.gnu.org> X-ZohoMailClient: External X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Have you been able to figure out why some of the items differ in the two lists? Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: elephly.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [136.143.188.56 listed in list.dnswl.org] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 0.0 AC_FROM_MANY_DOTS Multiple periods in From user name X-Debbugs-Envelope-To: 25235 X-Mailman-Approved-At: Mon, 06 Apr 2020 11:56:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Have you been able to figure out why some of the items differ in the two lists? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 20:03:05 2020 Received: (at 25235) by debbugs.gnu.org; 9 Apr 2020 00:03:05 +0000 Received: from localhost ([127.0.0.1]:53012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMKeu-0005YS-Pc for submit@debbugs.gnu.org; Wed, 08 Apr 2020 20:03:04 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:52856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMKer-0005Y0-LD for 25235@debbugs.gnu.org; Wed, 08 Apr 2020 20:03:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dLG+VuebxnIXrFY6+OmwnpO79k9PvYeu8ol5vZ0URyc=; b=i0rQJrN/s/GcnWuLC55KRyUOa mVz8QZGCQDNrREY4acnWRHCaAKwljDZz4/NRrowEBzJgSbKNVklOXtuKd0Ga250WlLUsCvZ3K1Ito pAFbQLRYP6C7LRoBxnmUjhZUQsN3oLcSaNK7yoqn90ldzDkT6zRplIBK4VXWv7++CT9/I=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jMKei-004oUi-CK; Thu, 09 Apr 2020 05:32:52 +0530 From: Arun Isaac To: Ricardo Wurmus Subject: Re: bug#25235: (no subject) In-Reply-To: <7f6e5ae41520.2159a21282e87de@guile.gnu.org> References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <7f6e5ae41520.2159a21282e87de@guile.gnu.org> Date: Thu, 09 Apr 2020 05:32:39 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Have you been able to figure out why some of the items differ in the two lists? Hi! Are you asking me? I haven't worked on this in a very long time. But I'll give it another shot now and get back to you. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 SLIGHTLY_BAD_SUBJECT Subject contains something slightly spammy 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: systemreboot.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 25235 Cc: 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain > Have you been able to figure out why some of the items differ in the two lists? Hi! Are you asking me? I haven't worked on this in a very long time. But I'll give it another shot now and get back to you. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6OZiEACgkQLiXui2GA K7OAPQf/cyL5HaPfxKPxtfU7jAuY+tvJwnd0M/LxUu4UYiCLKLD4Ved/qWBOd9uK ylo6qgMs5cqj0BBqoCjxZQPLC+T7gHc3qnDeyoCx5y/LnVjRCU5yBaYimrNnQJ9B SS0OVuo8vw8/sxq8VhHHpweZsHTG89MXdts3H5u6PqxbypbMZoLNbb30kenwRuEy hpurZtOcvl9t1X7+GV7UoG8nHZlH1DMURpFGfuleMeTGWApFSEnAbGepJonCU9bs vpJFzbSmmb+wNWfwawJfyfUmQGMtixAAsOEdrpo+sjWBCA+Nj7T7gpTG3vNOi1w0 ypW9PdfkI1UWb2T6p7bE9u0WKGBP6A== =Lxvu -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 20 22:15:59 2020 Received: (at 25235) by debbugs.gnu.org; 21 Apr 2020 02:15:59 +0000 Received: from localhost ([127.0.0.1]:48742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQiS7-0005l4-7P for submit@debbugs.gnu.org; Mon, 20 Apr 2020 22:15:59 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:45406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jQiS4-0005ks-3I for 25235@debbugs.gnu.org; Mon, 20 Apr 2020 22:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9lR0BwZ9voBzFIl58x/mCU0N/U00b0pkmZWZOps+36A=; b=db7xsLJI7CPr387JZfmZi4Srl sUJJFfSynyOIZ/Q6OK28yzm9VVbv+Nx5+Y+BJ4fvhqYHuHNhv6PdFP5L2Inn5rLDtcNlP1tn3GGXs V+kLczvf2NdMqFoa0FPHNhIWZ+3Aug3OpKHtnxmp0chYQbwo29AnTTy0NtzqeIhyK8RHc=; Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jQiRu-000IIr-Bs; Tue, 21 Apr 2020 07:45:46 +0530 From: Arun Isaac To: Ricardo Wurmus Subject: Re: bug#25235: Wrapped python programs get native-inputs in PYTHONPATH In-Reply-To: <7f6e5ae41520.2159a21282e87de@guile.gnu.org> References: <87eg13birp.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <7f6e5ae41520.2159a21282e87de@guile.gnu.org> Date: Tue, 21 Apr 2020 07:45:32 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi, > Have you been able to figure out why some of the items differ in the > two lists? The two lists are the same if `guix build' is invoked with the `--no-grafts' flag. I don't understand grafts very well and am not sure how that can be fixed. Any ideas? See different output below with and without the `--no-grafts' flag. $ guix build python-mock --8<---------------cut here---------------start------------->8--- `build-time-inputs' is (/gnu/store/dhs3v8rfzazq9cb37pqs7fdm5hd7zmf0-python-unittest2-1.1.0) `path' is (/gnu/store/v70qcgga1r2m6scnard8s61dqh859mn2-python-unittest2-1.1.0/lib/python3.7/site-packages /gnu/store/w408dkc1lynq5kqi2cxkvikalp6w35qw-python-pbr-minimal-3.0.1/lib/python3.7/site-packages /gnu/store/bwqidwykphzv10n454kxv3hfippq8qrx-python-six-1.12.0/lib/python3.7/site-packages /gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages /gnu/store/k4a9433nghpjhs101cm9v8k64bmd8iqf-python-traceback2-1.4.0/lib/python3.7/site-packages /gnu/store/3nl9hk7f59vsxgr7xmnqgc15y9c3rwpg-python-linecache2-1.0.0/lib/python3.7/site-packages) `(remove build-time-dependency? path)' is (/gnu/store/v70qcgga1r2m6scnard8s61dqh859mn2-python-unittest2-1.1.0/lib/python3.7/site-packages /gnu/store/w408dkc1lynq5kqi2cxkvikalp6w35qw-python-pbr-minimal-3.0.1/lib/python3.7/site-packages /gnu/store/bwqidwykphzv10n454kxv3hfippq8qrx-python-six-1.12.0/lib/python3.7/site-packages /gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages /gnu/store/k4a9433nghpjhs101cm9v8k64bmd8iqf-python-traceback2-1.4.0/lib/python3.7/site-packages /gnu/store/3nl9hk7f59vsxgr7xmnqgc15y9c3rwpg-python-linecache2-1.0.0/lib/python3.7/site-packages) --8<---------------cut here---------------end--------------->8--- $ guix build --no-grafts python-mock --8<---------------cut here---------------start------------->8--- `build-time-inputs' is (/gnu/store/m01qbb9sgymxh2xqwpnbv58h60yl4pz0-python-unittest2-1.1.0) `path' is (/gnu/store/m01qbb9sgymxh2xqwpnbv58h60yl4pz0-python-unittest2-1.1.0/lib/python3.7/site-packages /gnu/store/9k5hyd9d7b3r4yzadd6phphf12l2mfc8-python-pbr-minimal-3.0.1/lib/python3.7/site-packages /gnu/store/p8p65yd0pf95yn50iib0jw05p0n4mr9p-python-six-1.12.0/lib/python3.7/site-packages /gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages /gnu/store/dvn1fz82ccjg7dnqqmkxhwp720wnmriw-python-traceback2-1.4.0/lib/python3.7/site-packages /gnu/store/vnbk5jswscv68qasfbhmh7wqlsibyism-python-linecache2-1.0.0/lib/python3.7/site-packages) `(remove build-time-dependency? path)' is (/gnu/store/9k5hyd9d7b3r4yzadd6phphf12l2mfc8-python-pbr-minimal-3.0.1/lib/python3.7/site-packages /gnu/store/p8p65yd0pf95yn50iib0jw05p0n4mr9p-python-six-1.12.0/lib/python3.7/site-packages /gnu/store/78w7y0lxar70j512iqw8x3nimzj10yga-python-3.7.4/lib/python3.7/site-packages /gnu/store/dvn1fz82ccjg7dnqqmkxhwp720wnmriw-python-traceback2-1.4.0/lib/python3.7/site-packages /gnu/store/vnbk5jswscv68qasfbhmh7wqlsibyism-python-linecache2-1.0.0/lib/python3.7/site-packages) --8<---------------cut here---------------end--------------->8--- Regards, Arun --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6eV0UACgkQLiXui2GA K7OzgwgAh0Sc2MhdnPj5HMsuWQnCiib+zKMI1P2y7TfsKuM+m/YiqWzs9V+ushmf K7qErupO44DrqpKfl70iDDfiWjkzRkBloq3um40+dRebKNlfMaBbwlDRvxTc1OAw GeLRTn4GLXkL2gwd78AHXU+ALmupWxJRaNYZCZwDKqOry5Xcvjb6pc10REGQyTBh 28VpP7ezUWBIk9e98xZf/Ct/wNyNXMSABiGgersUr/vBEuQmQ654hg86VrFOAgsi X+TM9xxZzsw4ZJ7BiutOlKC1TIlzl7DJHxqTwtWngPEB5U8Qu9E+Rnz2Iy4yVD5a bSvSF+2UxftTp8Q5JtvdBRmrsyMtUA== =E6gx -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 16:29:39 2023 Received: (at 25235) by debbugs.gnu.org; 16 Jan 2023 21:29:39 +0000 Received: from localhost ([127.0.0.1]:35091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHX2x-00029M-CG for submit@debbugs.gnu.org; Mon, 16 Jan 2023 16:29:39 -0500 Received: from mail-qt1-f175.google.com ([209.85.160.175]:40543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHX2t-000295-Dn for 25235@debbugs.gnu.org; Mon, 16 Jan 2023 16:29:37 -0500 Received: by mail-qt1-f175.google.com with SMTP id jr10so18404363qtb.7 for <25235@debbugs.gnu.org>; Mon, 16 Jan 2023 13:29:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dbElHCEMT0WSOxYgjHnZNuzEUo4LJaK3AK8nbgLT0Rs=; b=LINanNSF4sjNPgnDeBB/gWTN5yhFZ8tbWGRhz6A5GItQmSOCbVHD/4LSvznbYZWbU0 GMhXwlWRgN3+sZPjyS4+iQT7/Kj+LEelGH3NF/Qn8jelJSOZN1VKGaOK8mL5A5grhfhU zZ6wnUtaeX/Ignx3/+T3HnHAYZIufKjhSbDXKD7kzn47YIOHEifj0FlSUk2fiEKsBCtu r85cfXCL23lYSXz58G6BfWfe8nPi7DzRxnMOMYbu8Ar3SdT2B/sT18SHQAZ+7bJqy5sB DpmyVqDd9EkL8IETxVCNeNNvJQmLFja9WXEOBmLKhtNgCIyMr9ifIEPpyQiduOvzuapd xWrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dbElHCEMT0WSOxYgjHnZNuzEUo4LJaK3AK8nbgLT0Rs=; b=4MP6Q7bCYsTfyVow1tnXv0KvTRRIAuIQWtBDFeHNDpQ4e38Eders73nhHVGURQ+9dR HXJ2TdpuFJOe3ySRw8MY0RqIk3ywgNB3BpETIllE7rJ7xY8d3zaPOY68v91jhhhiHLlZ g/T50jXhGX9wtMEs4a/X9zb2LOzTq1RtyZaQrITnlBn3EkG/XWmmG0K9+CKB64SHm5s2 CN+DRkw+z0XKFJ69aLdn6j1zBGqUoN3laY2sJMAZ0Ow0Pikv88FWPUTjwnYFRqX485vY H0jArCaVudg2PNIcV+u6o75CKSP2mOtJPbIgwmW5SS5HAHTgUu2aH603TiV+Qx0/9RUo +LoQ== X-Gm-Message-State: AFqh2krVVmNmvFDLEX4EjDJGSAPIA9leXCns4AGVUP1+UMtKPL3CvVSu 6UtW6U0fHbho4B+9qySlbDFmVoGexXxnvhK0 X-Google-Smtp-Source: AMrXdXv4jYadfrXgNzMyVKflkG+tRqxnUU6Cho1CPYb+P0N36KduhkMwH09XentUvePcus+qaMBPtA== X-Received: by 2002:ac8:5454:0:b0:3a8:45f:a47f with SMTP id d20-20020ac85454000000b003a8045fa47fmr692020qtq.49.1673904569433; Mon, 16 Jan 2023 13:29:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 13:29:29 -0800 (PST) From: Maxim Cournoyer To: 25235@debbugs.gnu.org Subject: [PATCH 0/1] build-system/pyproject: Do not wrap native-inputs. Date: Mon, 16 Jan 2023 16:29:18 -0500 Message-Id: <20230116212920.9641-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This fixes a longstanding issue. The fix is made trivial by the changes made in #60847 adding cross-compilation support for the pyproject build system. Additionally, it's based on #60868, which touches the wrap phase to use wrap-script instead of wrap-program. Maxim Cournoyer (1): build-system/pyproject: Do not wrap native-inputs. guix/build/pyproject-build-system.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) base-commit: 9da36aa1e207ff8a8fb2af8bc9442f9c935dc8db -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 16:29:48 2023 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 To: 25235@debbugs.gnu.org Subject: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 04:28:40 2023 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. 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=2C?= 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, 25235@debbugs.gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 10:49:13 2023 Received: (at 25235) by debbugs.gnu.org; 17 Jan 2023 15:49:13 +0000 Received: from localhost ([127.0.0.1]:37999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHoD3-0005xL-4F for submit@debbugs.gnu.org; Tue, 17 Jan 2023 10:49:13 -0500 Received: from mail-qt1-f170.google.com ([209.85.160.170]:40653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHoCx-0005x2-VO for 25235@debbugs.gnu.org; Tue, 17 Jan 2023 10:49:11 -0500 Received: by mail-qt1-f170.google.com with SMTP id jr10so20185405qtb.7 for <25235@debbugs.gnu.org>; Tue, 17 Jan 2023 07:49:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=atmHEGP+J01UGpbm2w+csmlYUatEsd8Ex85gW9T6mk8=; b=Tzjudb9nGOhz3CxFB/4HVA9KfG1Btwx5wb0kHwbsifN/jukRIJgLKHvjJPqXcUz/cA g6lraVmVZk9/0zWtCdscxA2u0QgJwSmRP0fpando6Z35cOBBSyxtbCitaD/KzWrIVd2J 00mEt6yzvcZzx5qV74npdmcLfp5yHoI7kuke+xuO3fm6NLN50Buky0c04dW6120LI44G rM7OpFN16TE+I+tfEsCmpmNyg/l+aRT8dtkfZMfPZDWlF/lPFZ9Wd8IMhacIMBCIfTjD 9NvFB891iR0OsYpUjy7s58/CAWqOA3XYwve4vMcPxPBsLb2PGDUKnUebgRpyGalUGuSP VhnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=atmHEGP+J01UGpbm2w+csmlYUatEsd8Ex85gW9T6mk8=; b=FUi846ojINvlH6qKGKLQlfpCzCtsofivafnfqEIFaq9D9LXBIV50VXvmMcZtAV8tHL 2aFZEzaVlhEs1pfeBYz+gNDn7xTl9GiB0yTtdfQnHGa+PwHH70guvt4opqGI7EQwB0wR MTOQgCy9K4nTpXjuE7nmdHEK03jdgFglSV53J+L5v/tfwja2Pz0J2U1f7MUdz4gRyRQX uBgIceotXH/feq/Y9hfY4QsT5bAc+wAgnWhwfg7H5RJ7r8lvmLoNjebjRHKkitVtpt3E zIJhExEu/syA+vO+IPNWct+hCZkMxXQqvNsSqcIZKEBVno11qz6xT5v/VqbLlWToCKfN 1QNg== X-Gm-Message-State: AFqh2kosVYS/dRaJaWxWa/pJ6+6YXiq8hU58mEYlT6ZVOiCOY0URlUqZ h8S8wZD1mCF6T0KEmhUaRJ4= X-Google-Smtp-Source: AMrXdXtwVcRx/NpVEsxIxTPS0BDqautf82/J0NiOnhLf/Ym3eKbHRxDFAQWTjsdgfX7wRg7lmxIBBw== X-Received: by 2002:ac8:5693:0:b0:3b6:30cb:b6c4 with SMTP id h19-20020ac85693000000b003b630cbb6c4mr10521587qta.25.1673970542434; Tue, 17 Jan 2023 07:49:02 -0800 (PST) Received: from hurd (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id k4-20020ac84744000000b003b630ea0ea1sm3133032qtp.19.2023.01.17.07.49.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 07:49:02 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. References: <20230116212920.9641-1-maxim.cournoyer@gmail.com> <20230116212920.9641-2-maxim.cournoyer@gmail.com> <874jspjyrv.fsf@gnu.org> Date: Tue, 17 Jan 2023 10:49:00 -0500 In-Reply-To: <874jspjyrv.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 17 Jan 2023 10:28:20 +0100") Message-ID: <877cxl2mc3.fsf@gmail.com> 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, 25235@debbugs.gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> Fixes . >> >> * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argu= ment. >> 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/pyprojec= t-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-inp= uts 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") "")))))) > > I think there=E2=80=99s no need to delay+thunk things since we=E2=80=99re= using 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) > > ? It's a (small) optimization, that was intended to delay things until they are really needed that was already used for %bash (now %guile) in the wrap phase of (guix build python-build-system). The idea is to delay the evaluation of native-input-directories or the lookup for guile in the inputs until it's really necessary. For example, the computations are avoided when there are no "bin" or "sbin" sub-directories in the outputs. > (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?) Yes, the change build on both #60847 (Enable cross-compilation for the pyproject-build-system) and #60868 (Use wrap-script instead of wrap-program), which should be applied first. %guile appears in #60868, and changes that make the above easy (native-inputs always appearing as native-inputs, even for native builds) are from #60847. --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 10:49:40 2023 Received: (at control) by debbugs.gnu.org; 17 Jan 2023 15:49:40 +0000 Received: from localhost ([127.0.0.1]:38002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHoDU-0005y4-Ig for submit@debbugs.gnu.org; Tue, 17 Jan 2023 10:49:40 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:35532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHoDT-0005xs-Ko for control@debbugs.gnu.org; Tue, 17 Jan 2023 10:49:39 -0500 Received: by mail-qv1-f53.google.com with SMTP id i12so21868563qvs.2 for ; Tue, 17 Jan 2023 07:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:from:to:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=iRrzQWH2n6rKtoiRc1ELUmTHR5iX9+d7XvHqHF4nqpY=; b=UE1d9faPf+omOXX/FcLu7OtX5iixlRqtZ2liRCmb9f12jJTnc/3uLSMgX6TqSDMB6n XGHwWLFMvn8LMKWrnW8z5mXoNdBlpJZt8WcfsVMXj2SUdggV8VzSsnaEWewnZ2ralTpB S0gaItNcVAXQ7He8QR0zTrhE8DueW/0UZywLL+FK3iR72c8Q0iCReWbxGMPgf+QCRf9t 7B2vs53N18+Tb+C09WReMk7AHK/sevo0JRtqgEzq+/wyvC7AzsHsPkUFhn/rBc6h1fUD BHkQlmc0rSmgzovI/T+liZcOUSQivVvRdUG/3EPxHC4iHqpvcBTTxP5eDwkCK11QvXSi h8mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iRrzQWH2n6rKtoiRc1ELUmTHR5iX9+d7XvHqHF4nqpY=; b=c1yntyRnh8ENXPPnseERImt760jOmKt1rbXiFemfTTCtC8rmilksqv6JJzXfsfkkry eFU3bc0b9Tn1lIaIaPsTsydPurr8Vr92sp06mH+zvpcM7f1kkbPaC+Y4KiBLKeYP9ubq m+E5dO6mRtAZCrJRHF7zjgOOgK35bweSi8FZp7hRyxwUrAuf5r0BKCZh+w9EL+U4kAmd yy/UFpl64lz/YkfyLfpoBYXI5M8nvb9uc7bKi7c8UHRF1o2p2ETyAvMfxNvDL+GV/ybK uJIB8qKppUS4KDnCL7ei9yQ9VvQVw6ZSCCSBpp5dg7teQ12Bw/79zLa/XdoS69Swhi6g +o+g== X-Gm-Message-State: AFqh2kqr+cNRxntCceaZq1YsWa6JXcObV0DvKZTKwz8HnzyUcgZGfwPr LtAiSe0Pqf8iBF2NInU+U3edTvsc8SgXXWlz X-Google-Smtp-Source: AMrXdXvmuHcFOmnsqdXRmIjpe9FYdBffN6r23C4TxUYiFL5tz+DtOcPpTS+X5vfvGRD/2mGHIalb6w== X-Received: by 2002:a05:6214:4499:b0:4df:59a8:b700 with SMTP id on25-20020a056214449900b004df59a8b700mr4072979qvb.42.1673970573987; Tue, 17 Jan 2023 07:49:33 -0800 (PST) Received: from hurd (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id g16-20020a05620a40d000b007055fa93060sm20654337qko.79.2023.01.17.07.49.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 07:49:33 -0800 (PST) Date: Tue, 17 Jan 2023 10:49:32 -0500 Message-Id: <875yd52mb7.fsf@gmail.com> To: control@debbugs.gnu.org From: Maxim Cournoyer Subject: control message for bug #25235 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) block 25235 by 60847 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 04:51:27 2023 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 To: Maxim Cournoyer Subject: Re: bug#25235: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. 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-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, 25235@debbugs.gnu.org, ludo@gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --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-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 08:23:02 2023 Received: (at 25235) by debbugs.gnu.org; 18 Jan 2023 13:23:02 +0000 Received: from localhost ([127.0.0.1]:39834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI8P8-0002hF-2y for submit@debbugs.gnu.org; Wed, 18 Jan 2023 08:23:02 -0500 Received: from mail-qt1-f177.google.com ([209.85.160.177]:42788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI8P5-0002ge-VT for 25235@debbugs.gnu.org; Wed, 18 Jan 2023 08:23:00 -0500 Received: by mail-qt1-f177.google.com with SMTP id fd15so19850874qtb.9 for <25235@debbugs.gnu.org>; Wed, 18 Jan 2023 05:22:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=q5D2dkPNoj9l8UdhXXn1K2IdK38DrzfK5vnXWWgLBbY=; b=W9DuLHXN7TEZPE97Zx9TrFIFCnkOt/32jdj4N4vx/THHHx5UOTyAqtHQCwm1Tw8mum vD1cXMa0YaHsicr7gnJIX8Ygr49xShryx4j03HiDZrQIn4hvHmPtfO2WBYao+GqaxTXc eTj1K6FGCNzN4KezD4TlDI0hMgYf+KasqPLuB7f4SkvM2Lm5z2oNdFgmURpDZ+6rVI7i 6kaUXqMUxXfFfwfpBYNfnPvdR5UxI9dGJ46Xep+Nqc2LpbLhkX6e3VkGqTiM153DJCH5 dOrbOeFYGg2D5ssXsAo6893xm/chthnFcCSOvb7YRDh7OjTnSKeRbVQjZbArYCzK/y+u D5Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=q5D2dkPNoj9l8UdhXXn1K2IdK38DrzfK5vnXWWgLBbY=; b=QVQe7G25YcN+tyCA2MO6rJ1eWgfjjGfQHZVbdmtkQRr8pUnbqFkU5A0PSFgUbYJqh0 qYOqR/RF6DZfYQCH/Yz8DskDe9rxIMZR/+OrHfwXanVp1OqXgkTqQwYmvX8MaNHkV/F9 5LqRfkpaU764SRzDtsK/nAk0MxwrTGWw7KsLhhOnq07sQNIlbjC3syPUmt+2LlEPibpz +iVybVzjZtI8mVvXGaGVR+ro8QPvnfr6dEErb/didc/u7wj/WBsytQqXWWCVIMNgJCc2 D4asWSQ+c2iJyuGLD/3JtrLdDpAk1XXSVhSfLGXBFVkSN0XDkLekT4VJV7C7Cc6pyjj9 WEPA== X-Gm-Message-State: AFqh2koiKLSVC8/6CfIimqJxoMZnByrDo/9K+FGFFDBbBSxfMrEXIGTY zYKY95eOKTZ5HTXR7DMJ9eY= X-Google-Smtp-Source: AMrXdXtgcHTCzExw5VZPcFe3xIpCeQ4SjDNaUivNxbBNwjE4foPoUDNHtl/dh6MrKxsFrmWvlrQ5kA== X-Received: by 2002:a05:622a:22a4:b0:3b6:3278:a390 with SMTP id ay36-20020a05622a22a400b003b63278a390mr9242522qtb.39.1674048174212; Wed, 18 Jan 2023 05:22:54 -0800 (PST) Received: from hurd (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id b2-20020ac84f02000000b003b635009149sm3662960qte.72.2023.01.18.05.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 05:22:53 -0800 (PST) From: Maxim Cournoyer To: Efraim Flashner Subject: Re: bug#25235: [PATCH 1/1] build-system/pyproject: Do not wrap native-inputs. References: <20230116212920.9641-1-maxim.cournoyer@gmail.com> <20230116212920.9641-2-maxim.cournoyer@gmail.com> Date: Wed, 18 Jan 2023 08:22:52 -0500 In-Reply-To: (Efraim Flashner's message of "Wed, 18 Jan 2023 11:51:16 +0200") Message-ID: <875yd47z9v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, 25235@debbugs.gnu.org, ludo@gnu.org, Lars-Dominik Braun , rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Efraim, Efraim Flashner writes: > 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. It wouldn't be included with the current simple logic, which simply remove any native input from the items of GUIX_PYTHONPATH. Good catch! I'll send a v2 with the refined check. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 08:59:33 2023 Received: (at 25235) by debbugs.gnu.org; 18 Jan 2023 13:59:34 +0000 Received: from localhost ([127.0.0.1]:39888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI8yT-0003dI-L8 for submit@debbugs.gnu.org; Wed, 18 Jan 2023 08:59:33 -0500 Received: from mail-vs1-f51.google.com ([209.85.217.51]:43973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI8yS-0003d5-8N for 25235@debbugs.gnu.org; Wed, 18 Jan 2023 08:59:32 -0500 Received: by mail-vs1-f51.google.com with SMTP id 187so5086432vsv.10 for <25235@debbugs.gnu.org>; Wed, 18 Jan 2023 05:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vzOJDPhG5s46fPVzSU5KFEZSxbPZs/E76iTIN7fn7wQ=; b=Al8jk8BH/fvHQa2xlvqeAhbVcp81jC6/3yEATOaD/kAPpAjwZGXM95Pq25QLiahK9J S25tDgreRRv3D/r2+rYIvGuJhUafVirm5hiGGrwOrDOU1JmJXjFJ+aYmdi7zkgIZ481V JCBJFQ+C1CtNMOtmnvnpyl4Ti2yZyKzQP6WgSCAMGT/B8DsfTYabhY5ucZjy5mJYWK+2 rQWt2wfsEurM+hxzswXPq65Ylu5jZECfnIt4zEY+4t+r0f3lv9EJxX/SXvR8yHCZnZMP of2oz5z5acYXE5vCi+KhgogOkSDjHVZYehnLZUPpjVF8C+FxqpMS8Ls+o7clgCp4DxLW kSUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vzOJDPhG5s46fPVzSU5KFEZSxbPZs/E76iTIN7fn7wQ=; b=BvYxozfPPfcMLm4wdIHUviW11O1EpTZVeVESW8Vx87lvL1xKj6MuKr9U2lV3pR5iBz dUMYFOb9sn1/T8HI8t8PGLirdYQogHG8tzNpysrNnXB5k2dBzON52gGeHx7pPtfAPGDp L52ef7kkYlZ7puXshnZx8ze5Z7QOtaxLxVqJFmIQHehg0Rxl8D8WCNVZ4exIKoVs3xgV vTzSGKD8VHjLfpzJi0d0+L0MLW7G+/0gBBvXEXEAgMSwnDdBif3KhKUnfZrzEN81PPBZ fH/Yi4HhLi69jL81SSnnX84QvqNAbWa9G6I8EFo1Njh9HMnvQ5EcMnlyLPtq7ea1hiAd r1BA== X-Gm-Message-State: AFqh2kpvYMr2gg5Q3zjeNdUpdYVNTN1MFkQeuajzyaHNx8kb1FRcDXi9 0L/sw7sjSCOAIfiIPGiYdT7rKfQKQ80lrp/3 X-Google-Smtp-Source: AMrXdXuwiAxYfYjdvUUuhKb5REVCMsErhYYA2Tof8TZ9XsC4ZLRhJSOONKM4NGzbvXKHyAoBXuE55A== X-Received: by 2002:a05:6102:548a:b0:3d0:a67d:d43b with SMTP id bk10-20020a056102548a00b003d0a67dd43bmr4903286vsb.16.1674050366100; Wed, 18 Jan 2023 05:59:26 -0800 (PST) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id r18-20020a05620a299200b006cebda00630sm22399334qkp.60.2023.01.18.05.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 05:59:25 -0800 (PST) From: Maxim Cournoyer To: 25235@debbugs.gnu.org Subject: [PATCH v2 0/1] build-system/pyproject: Do not wrap native-inputs. Date: Wed, 18 Jan 2023 08:59:06 -0500 Message-Id: <20230118135908.13162-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This fixes a longstanding issue. The fix is made trivial by the changes made in #60847 adding cross-compilation support for the pyproject build system. Additionally, it's based on #60868, which touches the wrap phase to use wrap-script instead of wrap-program. Changes in v2: - Add missing copyright line - Rework wrap phase to avoid removing inputs found in both native-inputs and inputs - Enclose wrap computations in an 'unless' form and streamline Maxim Cournoyer (1): build-system/pyproject: Do not wrap native-inputs. guix/build/pyproject-build-system.scm | 39 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) base-commit: 9da36aa1e207ff8a8fb2af8bc9442f9c935dc8db -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 09:00:54 2023 Received: (at 25235) by debbugs.gnu.org; 18 Jan 2023 14:00:54 +0000 Received: from localhost ([127.0.0.1]:39892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI8zm-0003gx-6e for submit@debbugs.gnu.org; Wed, 18 Jan 2023 09:00:54 -0500 Received: from mail-yw1-f170.google.com ([209.85.128.170]:39590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pI8zj-0003gj-3r for 25235@debbugs.gnu.org; Wed, 18 Jan 2023 09:00:52 -0500 Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-4d19b2686a9so340636597b3.6 for <25235@debbugs.gnu.org>; Wed, 18 Jan 2023 06:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/AK/zl6sgkui8TDEDsE+Jy91ApP9Eqqtts/Ib0j/ofo=; b=Agf1LGbH7K7sTsWy+5m36y/cHwrZBjxWtUPsQRl8qnB1JuzZn0+oQkq0MibbBFNeU3 745nBue8lrHb94PkQ3tHKnWOOZxiBZL0nEnln+0Nq57Hl65/goKP8nfEWyiWuV7sbVGC 09UVGsgFeNVSWrwedaBWoEXj4OBLqZK1/tA5X/A1PkEmwvtUTBP5i/pseppvGEt5Z/0C bsybXNdXeelhcqUMwbC/7FAic9g501gWGvCoXKKEJu10yQIi2u+6hvAsJv1NSjSNk8L6 RT5k8azWDwW1ZSMY06NqFBNkGvDAgepHhhDEQlj72p7vafbWhordeZQJpczDO2lgjE3B scPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/AK/zl6sgkui8TDEDsE+Jy91ApP9Eqqtts/Ib0j/ofo=; b=wtUXC9PvBIVoO6mTlGqobzA+Axz5uMG2m27qFad7V5CIra/DGGr1bygt35ps49FjZg XJnKO16R4w54MJ8kyk05m1yU31wBcd5YoU+0AeLFzQo0OK2LCelv9pW1xT+OJkKmAeLI 2TV+7IH+bj03GseVv10r//4fDQz1TRjsLh8LMLw3lnBWlia1HJmI9oDso3u24vkS3fO9 ZJEWSVCGgLar16ZP8utfKoZIppXqAOyoGpAoPBR3BSQ8YGgNrxzzshzmROAoB9Pn3bJE cCjcDX+yAJtNM+8WHtAk2FxzmbiKCi6B+3qXXGJ4SmzwLhxFqs7axKRF09R0mDL6Y0VU eF9Q== X-Gm-Message-State: AFqh2kqUKhypphEj3PlayeFVP/2QJfD/wFSFypjGAJGNENu8fD3cne9B Rqp0gsv4YD8IS54esGwb2ZhOVaagAtbZQv3D X-Google-Smtp-Source: AMrXdXvHLw7SbuNsdCqTN4AoFnjlbZaoIsbq/ZnSDH1PLnzf4+Z2jFdayVjOx0+tHs/p1WFifGnO4A== X-Received: by 2002:a81:1d43:0:b0:373:4bf8:e45d with SMTP id d64-20020a811d43000000b003734bf8e45dmr3184372ywd.20.1674050445326; Wed, 18 Jan 2023 06:00:45 -0800 (PST) Received: from localhost.localdomain (dsl-205-233-125-107.b2b2c.ca. [205.233.125.107]) by smtp.gmail.com with ESMTPSA id u6-20020a05620a0c4600b007054feab4aesm22201475qki.27.2023.01.18.06.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 06:00:44 -0800 (PST) From: Maxim Cournoyer To: 25235@debbugs.gnu.org Subject: [PATCH v2 1/1] build-system/pyproject: Do not wrap native-inputs. Date: Wed, 18 Jan 2023 09:00:35 -0500 Message-Id: <20230118140036.13436-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , efraim@flashner.co.il, rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argument. Filter out native inputs from the values in GUIX_PYTHONPATH. --- Changes in v2: - Add missing copyright line - Rework wrap phase to avoid removing inputs found in both native-inputs and 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-build-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 © 2021 Lars-Dominik Braun ;;; Copyright © 2022 Marius Bakke +;;; Copyright © 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)) -(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)) - ;; 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=? 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)))) (define* (rename-pth-file #:key name native-inputs outputs #:allow-other-keys #:rest args) -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 05:27:52 2023 Received: (at 25235) by debbugs.gnu.org; 23 Jan 2023 10:27:52 +0000 Received: from localhost ([127.0.0.1]:53445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJu3M-0007k0-0Y for submit@debbugs.gnu.org; Mon, 23 Jan 2023 05:27:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJu3K-0007jj-OD for 25235@debbugs.gnu.org; Mon, 23 Jan 2023 05:27:51 -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 1pJu3A-0001BV-BZ; Mon, 23 Jan 2023 05:27:40 -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=CfhY8czNUKwo5ZYfSuhyoq7mYYX0U3Xhin7zl1lx/Jc=; b=cJvm/3nEIKUwyp4vpXah LnWAEyJvOxazpWPAu7vPueCOIMVQVb4zEkqWzcBP9it5X6Cv1yLRdFfpWlmS715y2/67JaAzoCNGb B6ekEhYuzv29o+nh4p8YjGC4QdQy40pEbBKlXLDOyZxfhhOXfvRpSfxEp4awjiAra1ps7HjST0PYL aQq3FQ9Yi3BnLiHYkDZysBx8ayJQ2+8mMaPmXhI1BrAIPql8a1Awvme+N2CHz96KC0MBFtIPQdxyx NT+sLdWTBUXdNb4EG6tVC1EQwVyahJTzyfDr7q7graBpJiqCezgxi5fHZFtN+8cEIUUkYLbKgqefR WIblYnwJQ5eKIQ==; 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 1pJu39-0003QN-MA; Mon, 23 Jan 2023 05:27:39 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: [PATCH v2 1/1] build-system/pyproject: Do not wrap native-inputs. References: <20230118140036.13436-2-maxim.cournoyer@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 4 =?utf-8?Q?Pluvi=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Perce-neige 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, 23 Jan 2023 11:27:37 +0100 In-Reply-To: <20230118140036.13436-2-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Wed, 18 Jan 2023 09:00:35 -0500") Message-ID: <874jsh4kbq.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, 25235@debbugs.gnu.org, Lars-Dominik Braun , efraim@flashner.co.il, rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. LGTM! > - ;; 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)) I still don=E2=80=99t see what branch this snippet is on, what am I missing? :-) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 08:34:43 2023 Received: (at 25235) by debbugs.gnu.org; 23 Jan 2023 13:34:44 +0000 Received: from localhost ([127.0.0.1]:53670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJwyB-0000sz-MW for submit@debbugs.gnu.org; Mon, 23 Jan 2023 08:34:43 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:35684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJwyA-0000sm-DD for 25235@debbugs.gnu.org; Mon, 23 Jan 2023 08:34:42 -0500 Received: by mail-qt1-f179.google.com with SMTP id g16so7549152qtu.2 for <25235@debbugs.gnu.org>; Mon, 23 Jan 2023 05:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9ecGjvi5Ti8Ang3MFKRcyV++1827DbdzQF8mEuA2UTE=; b=RUwRAl+oTkvY/PEM5wfAao/Gm30/v3L9AtMIO3sn0pytJpMINynCMyrTb45JrzARWm Sh5wEFUfedoxVH/Scvz/X1XX1pNKa2OrHoFGIPsmHuG19tKblxJ8UunJSLdJTZxXGGId 0CP5v+fLHkP0IBeuTEpi646mJlhYT+Qmsz7jKr8qny0cb7FuON0YzLUrELMCwjnaXmiW buYXFsxO+0RnVKy8k9XadoBEUjzsx8fsddtDQ+Yii9ZbbgnCgRVHKf2y7G7zN43Mt8sr MOSWIj5NMXbsi63xg3AGVPJKqSsaxxSUqErh6rWQaa05apPmJ0Zm/WXYTk0McO41LFXk Pzmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9ecGjvi5Ti8Ang3MFKRcyV++1827DbdzQF8mEuA2UTE=; b=aNZzFcWc/16ZOp/IcOf53DY9PpVmGsrOLMwtnHqVAZPDQMcrCwmnjCbRWEAX71/EVz TEax2G1f+YfBYVJlrj9zT62gV07Q5NdGeLS+8FYSnyweShfWYLmHQQtQerdpdSicDQp3 +tnnmMeFcWqHC7rKaRllr4sEVDXfuZjoR2VlRqfwCTrHC+dfGCSYx6HgnlaKNvGAzX2x APWo6FPQtdkKTgHKnw4QddReJVTgR4KgIZDFnXWMpk73ywuRElzmrHwfTFUM6nkV0K+t ds005bW8/ZMm/GfeY5qMBhmlSmJF12HsDtObcyZeryV9H3QR/9itFAxmVBCFCR/u7NbU 4sqA== X-Gm-Message-State: AFqh2kpfTEvJIKwiROw6SHVkbp9oWfsCLxonfr9wCVGHKWgo44PCZBKL ZSN6MMb6p5VeXChLdZrCbsHJ0fxR630ko/zd X-Google-Smtp-Source: AMrXdXtv5OXcAQv7s3QkKoAfaT5cuIVBrCVgCn5aP3WEmUme9+gf7nrbAZIUrzqMF/wZaM0gLf+Uew== X-Received: by 2002:ac8:4813:0:b0:3b6:a0ef:bf2c with SMTP id g19-20020ac84813000000b003b6a0efbf2cmr14706104qtq.6.1674480876657; Mon, 23 Jan 2023 05:34:36 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id x15-20020a05620a448f00b006ea7f9d8644sm32165615qkp.96.2023.01.23.05.34.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 05:34:36 -0800 (PST) From: Maxim Cournoyer To: 25235@debbugs.gnu.org Subject: [PATCH v3 0/1] build-system/pyproject: Do not wrap native-inputs. Date: Mon, 23 Jan 2023 08:34:32 -0500 Message-Id: <20230123133434.1852-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , efraim@flashner.co.il, rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This fixes a longstanding issue. The fix is made trivial by the changes made in #60847 adding cross-compilation support for the pyproject build system. Additionally, it's based on #60868, which touches the wrap phase to use wrap-script instead of wrap-program. Changes in v3: - Rebase Changes in v2: - Add missing copyright line - Rework wrap phase to avoid removing inputs found in both native-inputs and inputs - Enclose wrap computations in an 'unless' form and streamline Maxim Cournoyer (1): build-system/pyproject: Do not wrap native-inputs. guix/build/pyproject-build-system.scm | 39 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) base-commit: 490e386e10ca2b7496c3da7ed85299ed3e9c2404 -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 08:34:47 2023 Received: (at 25235) by debbugs.gnu.org; 23 Jan 2023 13:34:47 +0000 Received: from localhost ([127.0.0.1]:53673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJwyE-0000tE-VV for submit@debbugs.gnu.org; Mon, 23 Jan 2023 08:34:47 -0500 Received: from mail-qv1-f45.google.com ([209.85.219.45]:35814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJwyC-0000sp-8B for 25235@debbugs.gnu.org; Mon, 23 Jan 2023 08:34:45 -0500 Received: by mail-qv1-f45.google.com with SMTP id i12so9082161qvs.2 for <25235@debbugs.gnu.org>; Mon, 23 Jan 2023 05:34:44 -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=ulA8p0kw1QPAIbxw8h0W803/vAbfgYZP26cBHN8CtkU=; b=WeK9saqlcc2nUoLeWb9KFQFe8dBJUUWNmTpAra7aXiSKWQzCAc17o2SdXiSHJ4IOQX COuRY3NjFyWuAKYUV2A9di1jsXIHEusA6KImmnSaY5aY9GcLafsW2yeQFsKe0YpyxxkF moJnxOXJB1KKOE/o8bP3FMtnyXI66r+vSf37EvDMGHYkxv3HDtxy/IfFKidUc9KN265K cRYqHHlmhEgsTGnEZ6NEeL1RHpnKHhUJLI3nOjVP44beDe8GkLdKVee6UBcjfFJG/YMa LzgDWlVI6eZp3gH579McjfVFNmBs8EcPD5Ou1dYQ3PNK4ZZ3lk1bt+jwUHVu/LhQSpHI QtQw== 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=ulA8p0kw1QPAIbxw8h0W803/vAbfgYZP26cBHN8CtkU=; b=PxHg9BODBgNXTpljuylV7Adxzq89z7LkwnBeiiHPMXS4KAT9Um1VOwwSqYZ90VTYIq qpd6M3x8yiDtnvG/WbBvC0UNc8pM5XmcVg1Y3WEaU3/y6Tox7gzPWVGEtUbcj49t8MoG fb0yRrYZnbFLAJb2ElapdFYGKrhJe3tSHvwqg/XLUhypIsyy57lckoWUO0zwIprMhMZf dDU0Z4o7cX7dxZr7DlAH7ZJC8XvVqqSvkojig94LUmq1x/KrmlngKeWBXcxcKs+XW18B krADKhOP99sWwdQPPGZmfmiQUgh2CBEo11HWC+o3h59r8fh6NC14MusCgiz5NcS+JomZ Nhdw== X-Gm-Message-State: AFqh2kqBuuz+oz0gd5/6l6llHyRJoK3kE7A5odB4JfVN+VU0NdqTNNBL tJ99SEspA5rsgilthM2N5nhN8X0+alNiOdN8 X-Google-Smtp-Source: AMrXdXvMVf3ejU3KumNHJDhG+NwoPD4z3Bo7WK8NKd6RLVP/9+9747W0UMeYJwm3ZvtTIkAGjtSdyQ== X-Received: by 2002:ad4:4181:0:b0:535:5a91:f4c8 with SMTP id e1-20020ad44181000000b005355a91f4c8mr19042592qvp.49.1674480878636; Mon, 23 Jan 2023 05:34:38 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id x15-20020a05620a448f00b006ea7f9d8644sm32165615qkp.96.2023.01.23.05.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 05:34:38 -0800 (PST) From: Maxim Cournoyer To: 25235@debbugs.gnu.org Subject: [PATCH v3 1/1] build-system/pyproject: Do not wrap native-inputs. Date: Mon, 23 Jan 2023 08:34:33 -0500 Message-Id: <20230123133434.1852-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230123133434.1852-1-maxim.cournoyer@gmail.com> References: <20230123133434.1852-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, Maxim Cournoyer , ludo@gnu.org, Lars-Dominik Braun , efraim@flashner.co.il, rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fixes . * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argument. 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 and 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-build-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 © 2021 Lars-Dominik Braun ;;; Copyright © 2022 Marius Bakke +;;; Copyright © 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)) -(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)) - ;; 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=? 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)))) (define* (rename-pth-file #:key name native-inputs outputs #:allow-other-keys #:rest args) -- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 23 08:38:21 2023 Received: (at 25235) by debbugs.gnu.org; 23 Jan 2023 13:38:21 +0000 Received: from localhost ([127.0.0.1]:53685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJx1h-0000zI-0D for submit@debbugs.gnu.org; Mon, 23 Jan 2023 08:38:21 -0500 Received: from mail-vs1-f49.google.com ([209.85.217.49]:40917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJx1g-0000z6-2n for 25235@debbugs.gnu.org; Mon, 23 Jan 2023 08:38:20 -0500 Received: by mail-vs1-f49.google.com with SMTP id 3so12833280vsq.7 for <25235@debbugs.gnu.org>; Mon, 23 Jan 2023 05:38:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=l+ykUbSWlwvFDnChu3Dahh2T0zHjzGToFM2DCSKjsq8=; b=j6hCo3PbDQRTG8h8w8XmzJQWY+R+TcTyXCxg839nvkVJgG51DdENh6+GiatjlAcVLJ 1lyiwx5fqhob2nShpBpMhcweI21mp9NaBbzzHjv8Rr61vb5Vt8RLYGn48Tg3CGjlKVD+ D4CFAeOKod1Qk+anlbFXXZNVjSl6TSZMO6LkXF0FamDw9MdbUyh8nrzH/qqYKLSIjtP+ UCKWnwypw7Fae4tZfBmhVqrNg2BXg9M22mmFUewUSmA842TCSGNlq8o+aDw/B/QBqiq4 cZsqs+sc6Z9xrfuYXTvT/ZBs/uPb0z2HtDCe4Qr7SzVKfj0vSO7rxcarFHni4q4t408n uiAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=l+ykUbSWlwvFDnChu3Dahh2T0zHjzGToFM2DCSKjsq8=; b=RzQ1R5whBwb1OnkRTzOIHtAL05feiagc9zy5p2IVlu2YeLOwu9fke3KXi+5akCn738 RL+Iffh0/Ma1nf/3/wH1DG2esyJmGI65wilrFKMkav9PxlOBvFOhzHJArtKzbl8Uyovk 93YZwsvsNKfLMzyCQTbMdDRVqRj6LgUb2prtxWHEt6H2ezNDUy0xAjhFL4u2/JPCxC/c RhF2QxoZfvRFo7gYoI7wi0nLqn14XYUQapcHUAzK53qoOOfX/npojKM3IgQ/HHorDMJ/ ZdOxdzeSOm9beTnwfjaQpl1vY2LRU0Emod/bMWA7eg+nfttJmu+RVg+gkdrpn+wI59lO gBKA== X-Gm-Message-State: AFqh2kpB51dz7aTroi6mlzMyS0DUjokSvWidQcUEXci5xMapEXPhL2HI uLU/A4zkzGIpnv4GRmLGd8M= X-Google-Smtp-Source: AMrXdXs+gg/cr99KdOU0qPjvoCPc2MuB8sediCfcrSs6KsCA21brR0bG0Cf8O1Y4YqOEYiFvK61tVQ== X-Received: by 2002:a05:6102:a15:b0:3d1:7e22:f037 with SMTP id t21-20020a0561020a1500b003d17e22f037mr13836479vsa.16.1674481094513; Mon, 23 Jan 2023 05:38:14 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id h9-20020a05620a244900b00705cef9b84asm14437304qkn.131.2023.01.23.05.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 05:38:14 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [PATCH v2 1/1] build-system/pyproject: Do not wrap native-inputs. References: <20230118140036.13436-2-maxim.cournoyer@gmail.com> <874jsh4kbq.fsf@gnu.org> Date: Mon, 23 Jan 2023 08:38:11 -0500 In-Reply-To: <874jsh4kbq.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 23 Jan 2023 11:27:37 +0100") Message-ID: <87bkmpz7zw.fsf@gmail.com> 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: arunisaac@systemreboot.net, 25235@debbugs.gnu.org, Lars-Dominik Braun , efraim@flashner.co.il, rekado@elephly.net, jgart , marius@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> Fixes . >> >> * guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argu= ment. >> Filter out native inputs from the values in GUIX_PYTHONPATH. > > LGTM! > >> - ;; 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)) > > I still don=E2=80=99t see what branch this snippet is on, what am I missi= ng? > :-) It's based on https://issues.guix.gnu.org/60868, itself based on https://issues.guix.gnu.org/60847. I've tried to express this relationship by marking the dependent changes blocked by the submissions they are based on. I've just rebased the 3 submissions and added you in CC; hopefully that helps! --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Wed May 01 05:37:19 2024 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 Authentication-Results: garm.ovh; auth=pass (GARM-109S00370523676-a61a-4ae0-8da9-a3dec0047e7e, 5F0A7FF2C228E3343510C34D8EFB1B12B49C7703) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 From: Nicolas Graves To: Lars-Dominik Braun , Ricardo Wurmus Subject: [Maxim Cournoyer] bug#25235: [PATCH v3 1/1] build-system/pyproject: Do not wrap native-inputs. 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25235 Cc: 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat May 04 04:05:58 2024 Received: (at 25235) by debbugs.gnu.org; 4 May 2024 08:05:58 +0000 Received: from localhost ([127.0.0.1]:51917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3AP8-0007Se-8B for submit@debbugs.gnu.org; Sat, 04 May 2024 04:05:58 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:58512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3AP5-0007SW-Os for 25235@debbugs.gnu.org; Sat, 04 May 2024 04:05:57 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4VWgFv0Kfkz9slT; Sat, 4 May 2024 10:05:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1714809923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EYIIdXXf6m1L8zus75LOYPenzk8BEsHgXCxE6Ar+QX0=; b=UmCAwMd8EfEgZA5T2R7Vs7hBZ3fEE1GmitJwBL6JYjXk9pYf/qXSdGuCg0gGlx7DFusXRy g+IiLm7uedN9HfRjvv/m+9fV8SNgEyhMMmxIwQiWS9gR89el9e/JLj0sNUPZoa9dOWbSOk bA2JwRA1SLnNbzrU9/le2seDiUxOvm4SdLFxE8F9rOhUhwf8JTHXg6TY21E/11Ic8FxXeu ZNceVSCTlKlIGepFwN9Xx9lClzEP85RAZgU7ppoxIpXeDu3/0H3xeTOU13TmEAUr59Yik3 vLK0Ewf9b7by2TUEsVv5f7hgF8y1dJ3kxfUVi7JJ9oDXAAiAa7jhCy9Nhr+euA== Date: Sat, 4 May 2024 10:05:19 +0200 From: Lars-Dominik Braun To: Nicolas Graves Subject: Re: [Maxim Cournoyer] bug#25235: [PATCH v3 1/1] build-system/pyproject: Do not wrap native-inputs. Message-ID: References: <20230123133434.1852-2-maxim.cournoyer@gmail.com> <874jbheuvh.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874jbheuvh.fsf@ngraves.fr> X-Rspamd-Queue-Id: 4VWgFv0Kfkz9slT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25235 Cc: Ricardo Wurmus , 25235@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, > 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. I believe this change is based on #60847, which Ludo objected to (https://issues.guix.gnu.org/60847#19-lineno32). Thus it cannot be merged. Lars