From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0ErOAu6vl2GirAAAgWs5BA (envelope-from ) for ; Fri, 19 Nov 2021 15:08:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gJ4LOu2vl2EICgAAB5/wlQ (envelope-from ) for ; Fri, 19 Nov 2021 14:08:45 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1BD44C5B2 for ; Fri, 19 Nov 2021 15:08:45 +0100 (CET) Received: from localhost ([::1]:40646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo4ZH-0001bb-HZ for larch@yhetil.org; Fri, 19 Nov 2021 09:08:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo4N0-0004Wu-Qj for guix-patches@gnu.org; Fri, 19 Nov 2021 08:56:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo4N0-0001mi-Hr for guix-patches@gnu.org; Fri, 19 Nov 2021 08:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mo4N0-0000QJ-G7 for guix-patches@gnu.org; Fri, 19 Nov 2021 08:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51948] [PATCH] Meson needs proper wrapping Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Nov 2021 13:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51948 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 51948@debbugs.gnu.org Received: via spool by 51948-submit@debbugs.gnu.org id=B51948.16373301221542 (code B ref 51948); Fri, 19 Nov 2021 13:56:02 +0000 Received: (at 51948) by debbugs.gnu.org; 19 Nov 2021 13:55:22 +0000 Received: from localhost ([127.0.0.1]:38461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mo4ML-0000Oo-JP for submit@debbugs.gnu.org; Fri, 19 Nov 2021 08:55:22 -0500 Received: from planete-kraus.eu ([89.234.140.182]:45898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mo4MJ-0000Ob-9B for 51948@debbugs.gnu.org; Fri, 19 Nov 2021 08:55:20 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 5f90145d; Fri, 19 Nov 2021 13:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type; s=dkim; bh=L/kqUor1dcjLNXggGdAxzMMsX nA=; b=yNBp7sNCpuruacmYt+vaGxsXFk6j6BwVl9W/kPyF5c2OXTH1mBRTgsbB8 325PVuVX4G9/JCjZFwLPRD7Iv2VdechX8jQTyXrFMf+llsBP7nuYFv2lNqkjFmbU tbwEBDNTCbSgwuVk7Qtfo0uCGND8it2f0yx/tIO3yk5LgK2rJE= Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 2af5a1ed (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Fri, 19 Nov 2021 13:55:14 +0000 (UTC) References: <87r1bda6ff.fsf@planete-kraus.eu> <8735nsmgqc.fsf@gnu.org> User-agent: mu4e 1.6.10; emacs 27.2 Date: Fri, 19 Nov 2021 14:20:50 +0100 In-reply-to: <8735nsmgqc.fsf@gnu.org> Message-ID: <877dd49rnn.fsf@planete-kraus.eu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches From: Vivien Kraus via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637330925; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=q87SRYRvKn9EuAWIlRtGnl+oAk+VmHUDnudIO1/OkDE=; b=FdIMObc7lBJhkS+7J1zF6Yx2bwSF9K9o0JBkJ57Ffm/JZKpRVtHBXa1h6GncLLGNvQ2X8X zeX/mFEJJ1PP38ml6qHfop27CvEBCUDNwKBGHsJR19JatFrTtD+4CKuytJNtn8qEBxrcNA GNQgUIID5muKqw5rlH71DhbkQml5kIbKM+aIlsD26Zi0ONcK51KwUTuTwu5dfFTwb0gwmO RdqmcV0fjABzGdc5tLWBJpVArbJz3FVMeRCGlgXKtKoGMF3B7mOVLJZcHQaxy7Lr/r2qBM lVmeGocJglKKKXxlOrYtUVVxakUgmjiCoxC7cPXaBEzefUdPoKo7LOsO9X9JAQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637330925; a=rsa-sha256; cv=none; b=tMPBPDyXkmuhYCJbrDUopm66imzRnUZUO2TlFFu3xnyKeUspBarPYbugC2L9ez41eFoRQl DAIkpoM/q90emZ/EJHPC6+euO8VczUo87kzrCgGYlZY0u8qrETZ3/bj4QVL2uoHpmfVplX BXJUcVbmJOQXmWVsWHlPqvtSZpns+u6IHnI0X1K5fG/Rk32juT0Q8R3uaRqXyLQuaPYFjt X8QEnzDps0KcjqQlkffXA2DxTLpiZLLbVP+MvPeJXKbjpmHBITSywzLiogNq+KhKiZEwhk aWdOxF8ZoxijiwKvG+sgVIXy+BFGlumNNmVpMgFVxGjoPT1Xeu45KJccAiYL0Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=dkim header.b=yNBp7sNC; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=planete-kraus.eu header.s=dkim header.b=yNBp7sNC; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1BD44C5B2 X-Spam-Score: -3.97 X-Migadu-Scanner: scn0.migadu.com X-TUID: Lp03acsgAjiG --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Vivien Kraus skribis: >> Meson needs to be wrapped, but the wrapping must not execute a new >> process, if I understand correctly. I could use wrap-script, but I think >> it=E2=80=99s more pythonic to set the path through sys.path rather than = setting >> an environment variable. > > Isn=E2=80=99t that what =E2=80=98wrap-script=E2=80=99 does? I think wrap-script converts the python script to a guile script that happens to be the same file as the python script. I realize it won=E2=80=99t even insert python code in the final program, so the wrapping code won=E2= =80=99t be executed when the python module is loaded by the python interpreter. > How about providing a user-facing =E2=80=98meson=E2=80=99 package that in= corporates this > fix, while keeping the other =E2=80=98meson=E2=80=99 packages unchanged, = to avoid > rebuilding too much? This can be achieved by marking the other packages > as hidden. I pushed an update that does precisely that. Is the name "meson-wrapped" OK? Also, how can I influence guix to rather install the wrapped version when the user invokes "guix install meson"? > Could you check =E2=80=98guix gc --references meson=E2=80=99 to make sure= it does not > capture too much? (GUIX_PYTHONPATH might contain references to > build-time dependencies.) I see, the only thing to wrap is just the "out" output in fact. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-meson-Extend-the-python-path-in-the-installed-pr.patch Content-Transfer-Encoding: quoted-printable From=20dcb7114ada82da073adbbfbeef929a9daa558ccb Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Thu, 18 Nov 2021 15:17:52 +0100 Subject: [PATCH] gnu: meson: Extend the python path in the installed progra= m. * gnu/packages/build-tools.scm (meson-wrapped): New variable. =2D-- gnu/packages/build-tools.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 849101c2a4..f323b6a388 100644 =2D-- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -297,6 +297,28 @@ (define-public meson resembles Python.") (license license:asl2.0))) =20 +(define-public meson-wrapped + (package/inherit meson + (arguments + `(;; FIXME: Tests require many additional inputs and patching many + ;; hard-coded file system locations in "run_unittests.py". + #:tests? #f + #:phases (modify-phases %standard-phases + ;; Meson calls the various executables in out/bin throug= h the + ;; Python interpreter, so we cannot use the shell wrappe= r. + (replace 'wrap + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((python-version + (python-version (assoc-ref inputs "python"))) + (output (assoc-ref outputs "out"))) + (substitute* (string-append output "/bin/meson") + (("# EASY-INSTALL-ENTRY-SCRIPT") + (format #f "\ +import sys +sys.path.insert(0, '~a/lib/python~a/site-packages') +# EASY-INSTALL-ENTRY-SCRIPT" + output python-version))))))))))) + ;;; This older Meson variant is kept for now for gtkmm and others that may ;;; have problems with 0.60. (define-public meson-0.59 =2D-=20 2.34.0 --=-=-= Content-Type: text/plain Vivien --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEq4yIHjMvkliPpwQnO7C8EjLYuCwFAmGXrLwACgkQO7C8EjLY uCwttwwAzrisBLi5jmz63/N7N6gzDA4BqZt4i6VHwzPtHHJ5zswesO2ostFbbgg1 dMygZLx/lloGDJ0UoxM4PC/LgVLZlwDRHi5NBP5/TFhVH7q8lEeylwKJSe+qXp0v d4dTgYQ/MstrTL98xHTZuDEM9QOJfAIH68tIhhd+fDJMQk0iGY+hI+IHhvBtWzwb ei5T+uUtD6i1EaykPUXO2Cs3AIsYMRLOQ0TvfDUE99JnpDVWu82YLHlcaASj+B+t zO3aXdWeGj3FrIlr10R3AMKACZr6VyMjfNpUlEOLDqWxM/pg4L2O2LPnNZYxSN5t eNOSXXKaTy8UMPnJn/mEo5FtOihizexbo3jd6EFkIln0/wBzFdEJB2+7QKG5dy9Y P22k0u9SsmyUS0PVZ+3563lgMlb1daIWRLe0jdwEDXX4Bv0+k87dcc5K/n8IbLOL /ZbJShUvhz3q0hHIDntTVLehyfiSpk5w4XkyHxAKLWxRRFVJNely6BNvN4I53CQq jWHFeQYg =Xyoa -----END PGP SIGNATURE----- --==-=-=--