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 saw a similar pattern and I did something like
that for a PyTorch recipe but it's the thing I didn't like
and felt unclean.
But in this case with meson and pep517 with build-backend = mesonpy,
meson setup/build/install would actually be run twice.
While meson setup with the same options and build may not
take much time the second time, installing can.
I am sure someone wouldn't like that.
There is a saying here that goes like "which of my fingers
should I bite to not hurt?"
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.
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178672):
https://lists.openembedded.org/g/openembedded-core/message/178672
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]]
-=-=-=-=-=-=-=-=-=-=-=-