All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <Ross.Burton@arm.com>
To: "Böszörményi Zoltán" <zboszor@gmail.com>
Cc: "openembedded-devel@lists.openembedded.org"
	<openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [meta-python][PATCH 1/4] python_setuptools_build_meta_mesonpy.bbclass: New class
Date: Wed, 15 Mar 2023 18:08:27 +0000	[thread overview]
Message-ID: <114986A0-9EE9-4739-8E16-A5F43607A52C@arm.com> (raw)
In-Reply-To: <ef5796b4-41a9-1eb4-fa5b-8a30d12c509e@gmail.com>

On 15 Mar 2023, at 14:16, Böszörményi Zoltán <zboszor@gmail.com> wrote:
> 
> 2023. 03. 15. 13:46 keltezéssel, Ross Burton írta:
>> On 15 Mar 2023, at 08:04, Zoltan Boszormenyi via lists.openembedded.org <zboszor=gmail.com@lists.openembedded.org> wrote:
>>> Some python modules (e.g. SciPy, scikit-image) use meson-python
>>> (a.k.a. mesonpy) in pyproject.toml:
>>> 
>>>    [build-system]
>>>    build-backend = 'mesonpy'
>>> 
>>> This class, together with python3-meson-python and its dependencies
>>> will allow building such modules.
>> So the pep517 build thing provides dependencies (which we ignore),
> 
> Does this mean recipes using this class would specify the
> build dependencies themselves instead of having them
> brought in via the class?

Yes. That’s explicit and intentionally the desired behaviour.  Dependencies are declared in the recipe.

>> build isolation (which we disable), and automatic use of the right tooling (which we have to specify manually).
> 
> Not sure what this means, please elaborate.

The python ‘build’ tool can do builds inside a minimal virtual environment. We deliberately don’t do this: dependencies are expected to be in the sysroot via DEPENDS, and they should be used. build won’t be able to fetch anything else during do_compile anyway, as the network is disabled.

build also reads the pyproject.toml to determine what build tool to use.  As we need dependencies up front this isn’t possible.

> Please instruct me what clean up in this class to get this acceptible.
> 
> meta-scipy has a quite old SciPy version and the latest version uses this thing.
> I have a working scikit-image 0.20.0 recipe also using this.
> 
>> So what does the meson-python integration bring?  Can we just run meson directly?
> 
> Unfortunately, no.
> 
> meson itself does not provide a PEP517 compliant build backend.
> meson-python (mesonpy, https://pypi.org/project/meson-python/) does that as a wrapper over meson.

Right, but if we’re just calling meson that isn’t relevant.

> I tried just using meson, but while it the .so parts were built,
> none of the .py files were properly owned and no egg metadata
> was generated. While the first issue is fixable in the recipe,
> the second isn’t.

So the point of meson-python is to write the package metadata, right.

It seems very overcomplicated for such a simple job, but fine.

I’ll give this another review tomorrow, but fyi you can remove the setuptools dependency.

Ross

  reply	other threads:[~2023-03-15 18:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15  8:04 [meta-python][PATCH 1/4] python_setuptools_build_meta_mesonpy.bbclass: New class Zoltán Böszörményi
2023-03-15  8:04 ` [meta-python][PATCH 2/4] python3-patchelf: New recipe Zoltán Böszörményi
2023-03-15 12:42   ` [oe] " Ross Burton
2023-03-15 14:18     ` Böszörményi Zoltán
     [not found]     ` <174C9D7A024E2A7B.8829@lists.openembedded.org>
2023-03-15 17:49       ` Böszörményi Zoltán
     [not found]       ` <174CA8FCFC219282.31505@lists.openembedded.org>
2023-03-15 18:23         ` Böszörményi Zoltán
2023-03-15  8:04 ` [meta-python][PATCH 3/4] python3-pyproject-metadata: " Zoltán Böszörményi
2023-03-15  8:04 ` [meta-python][PATCH 4/4] python3-meson-python: " Zoltán Böszörményi
2023-03-15 12:46 ` [oe] [meta-python][PATCH 1/4] python_setuptools_build_meta_mesonpy.bbclass: New class Ross Burton
2023-03-15 14:16   ` Böszörményi Zoltán
2023-03-15 18:08     ` Ross Burton [this message]
2023-03-16 15:51 ` Tim Orling
2023-03-16 16:36   ` Böszörményi Zoltán

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=114986A0-9EE9-4739-8E16-A5F43607A52C@arm.com \
    --to=ross.burton@arm.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=zboszor@gmail.com \
    /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 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.