Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Merged]: [RFC] common/build-helper/meson.sh: new build helper, used by meson build style
Date: Fri, 22 Sep 2023 16:17:02 +0200	[thread overview]
Message-ID: <20230922141702.f_MyF_tPBGw7ED7RyJEaN4EkETvJa-dSeFSDEGOK26M@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46117@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2317 bytes --]

There's a merged pull request on the void-packages repository

[RFC] common/build-helper/meson.sh: new build helper, used by meson build style
https://github.com/void-linux/void-packages/pull/46117

Description:
The `python3-scipy` package now builds with `python3-meson-python`, with some more coming down the pike. The Python build process is necessary to include Python package metadata. For SciPy, this is accomplished by using the `meson` build style to configure a build directory, then overriding `do_build` and `do_install` to build things the PEP517 way (using the pre-configured build directory).

It might be helpful to define a `meson` build helper that can write out the standard cross file for builds, allowing packages like SciPy to use the `python3-pep517` build style with the `meson` helper. There are some issues to be worked out:
1. It seems like the `xbps_meson.cross` is written before `CFLAGS`, *et al.* are properly defined, so this cross file is actually broken. (This is the process by which the `qmake` helper writes its configurations, and they reference `CFLAGS` and others; is the `qmake` helper writing broken configs?)
2. The meson configuration (which would need to happen even with `python3-pep517` plus a `meson` helper) still includes a lot of magic that would have to be brought over to templates. This isn't really easier than the current practice of overriding the one-line `do_build` and `do_install`.

A possible solution would be to define a special-purpose function in the helper, called `vmesoncross` or somesuch, that will only write the configured when called---from a build function where these are properly defined (*e.g.*, `pre_configure`, `do_configure`). We could also define a special `do_configure`-like function in the helper that can be used by the `meson` style to actually do the configuration. This might be a bit ugly, but avoids repetition or violating the typical practice that the actual build functions are only defined in templates or build styles.

A third option is just defining a new `python3-meson` build style that mashes the meson `do_configure` bits from the `meson` style with the `do_build` and `do_install` bits from the `python3-pep517` style.

All of these options are sub-optimal, but I'm not sure which one is least offsensive.

      parent reply	other threads:[~2023-09-22 14:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 19:53 [PR PATCH] [RFC, WIP] " ahesford
2023-09-18 20:02 ` tornaria
2023-09-20  3:25 ` tornaria
2023-09-20 14:46 ` [PR PATCH] [Updated] " ahesford
2023-09-20 14:48 ` ahesford
2023-09-20 14:50 ` ahesford
2023-09-20 14:54 ` ahesford
2023-09-20 15:13 ` [PR PATCH] [Updated] " ahesford
2023-09-20 15:16 ` ahesford
2023-09-20 22:16 ` tornaria
2023-09-21  0:36 ` [RFC] " ahesford
2023-09-21  0:50 ` ahesford
2023-09-21  0:51 ` ahesford
2023-09-21 19:28 ` [PR PATCH] [Updated] " ahesford
2023-09-22 14:17 ` ahesford [this message]

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=20230922141702.f_MyF_tPBGw7ED7RyJEaN4EkETvJa-dSeFSDEGOK26M@z \
    --to=ahesford@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).