From: "Ludovic Courtès" <ludo@gnu.org>
To: Vivien Kraus <vivien@planete-kraus.eu>
Cc: 51948@debbugs.gnu.org
Subject: [bug#51948] [PATCH] Meson needs proper wrapping
Date: Fri, 19 Nov 2021 14:12:43 +0100 [thread overview]
Message-ID: <8735nsmgqc.fsf@gnu.org> (raw)
In-Reply-To: <87r1bda6ff.fsf@planete-kraus.eu> (Vivien Kraus's message of "Thu, 18 Nov 2021 15:23:48 +0100")
Hi!
Vivien Kraus <vivien@planete-kraus.eu> 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’s more pythonic to set the path through sys.path rather than setting
> an environment variable.
Isn’t that what ‘wrap-script’ does?
> Now, this will create a world rebuild… What do you think?
Not good! :-)
This Meson issue is not a regression compared to master, is it?
How about providing a user-facing ‘meson’ package that incorporates this
fix, while keeping the other ‘meson’ packages unchanged, to avoid
rebuilding too much? This can be achieved by marking the other packages
as hidden.
> From 08845844e8e1a18232bf54f9f3f0b71d5e0c71ef Mon Sep 17 00:00:00 2001
> From: Vivien Kraus <vivien@planete-kraus.eu>
> Date: Thu, 18 Nov 2021 15:17:52 +0100
> Subject: [PATCH] gnu: meson: Extend the python path in the installed program.
>
> * gnu/packages/build-tools.scm (meson) [phase wrap]: Wrap the python path as
> python code.
> ---
> gnu/packages/build-tools.scm | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
> index 849101c2a4..ef5aa4bd35 100644
> --- a/gnu/packages/build-tools.scm
> +++ b/gnu/packages/build-tools.scm
> @@ -283,7 +283,21 @@ (define-public meson
> #:phases (modify-phases %standard-phases
> ;; Meson calls the various executables in out/bin through the
> ;; Python interpreter, so we cannot use the shell wrapper.
> - (delete 'wrap))))
> + (replace 'wrap
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((path (string-split (getenv "GUIX_PYTHONPATH") #\:)))
> + (substitute* (string-append (assoc-ref outputs "out") "/bin/meson")
Could you check ‘guix gc --references meson’ to make sure it does not
capture too much? (GUIX_PYTHONPATH might contain references to
build-time dependencies.)
I suppose GUIX_PYTHONPATH contains the package’s “out”, right?
Thanks!
Ludo’.
next prev parent reply other threads:[~2021-11-19 13:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 14:23 [bug#51948] [PATCH] Meson needs proper wrapping Vivien Kraus via Guix-patches via
[not found] ` <handler.51948.B.16372454395205.ack@debbugs.gnu.org>
2021-11-18 16:00 ` [bug#51948] Acknowledgement ([PATCH] Meson needs proper wrapping) Vivien Kraus via Guix-patches via
2021-11-19 13:12 ` Ludovic Courtès [this message]
2021-11-19 13:20 ` [bug#51948] [PATCH] Meson needs proper wrapping Vivien Kraus via Guix-patches via
2021-11-19 22:17 ` Ludovic Courtès
2021-11-19 22:34 ` Vivien Kraus via Guix-patches via
2021-11-22 21:44 ` bug#51948: [PATCH] [core-updates-frozen] Wrap meson with python code Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735nsmgqc.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=51948@debbugs.gnu.org \
--cc=vivien@planete-kraus.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.