2023. 03. 16. 0:08 keltezéssel, Richard Purdie írta:
On Wed, 2023-03-15 at 18:20 +0100, Zoltan Boszormenyi wrote:
2023. 03. 15. 17:52 keltezéssel, Ross Burton írta:
On 15 Mar 2023, at 08:00, Zoltan Boszormenyi via lists.openembedded.org 
<[email protected]> wrote:

   apart from the CONFIGURE_FILES line which would still be needed in the 
python-meson case anyway.

I can’t see what is gained here, just inherit meson.
The problem is that "inherit meson python_pep517" ends up with

do_configure () {
      meson_do_configure
}

do_compile () {
      meson_do_compile
}

when the python_pep517_ prefixed ones are needed.
It has something to do with the fact that both has the line

EXPORT_FUNCTIONS do_configure do_compile do_install

Which one wins may depend on inheritance order but
who's to say for sure and why can't this be order agnostic?
Which one wins being due to inheritance order is by design.

The export functions code adds wrappers meaning by default,
XXXX_do_configure is called by do_configure but if needed you can write
a custom function which does something like:

do_configure () {
     pep517_do_configure
     meson_do_configure
     autotools_do_configure
}
i.e. call class specific definitions in an order of your choosing. I
appreciate the above wouldn't make much sense but you see the idea
behind it.

I need most of meson.bbclass for the settings in the new
meta_mesonpy class to pass to meson but using the pep517
machinery.
I really dislike these "common" class abstractions and I think we need
to find a better way to handle things. Order does matter to class
inheritance already so we can rely and document that if needed.

So, if I were to use this in the new meta_mesonpy class:

inherit python_pep517 meson

then it will do what I need, even without splitting meson.bbclass into two, 
right?

I will test this.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178698): 
https://lists.openembedded.org/g/openembedded-core/message/178698
Mute This Topic: https://lists.openembedded.org/mt/97622973/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to