On 4 Dec 2023, at 19:46, Eric Guinn via lists.yoctoproject.org <eric_guinn=selinc....@lists.yoctoproject.org> wrote: > > Hello, > > I need some feedback/advice on a "problem" I'm facing with the recipe system. > Currently, I have a library written in C++ that also has generated SWIG > bindings and a resultant Python lib to install. In order to do both the C++ > build/install and the python build/install I have to use two different > recipes, but really these outputs always need to be present together (they're > in the same repo). I may also add .NET bindings in the future, so any answers > related to that will help as well. > > Insofar I've not found a way to get a single recipe to do multiple > builds/installs, if I do: > > ``` > inherit cmake > inherit setuptools3 > ``` > > then all I get is python, if I do the opposite, all I get is C++. > > It could just be that what I'm trying to do is anti-pattern and stupid, in > which case please let me know and I'll keep using multiple recipes.
Multiple recipes may well be the easiest thing to do, as you can make on RDEPEND on the other. However, when you’re inheriting multiple classes that provide eg do_compile, the last inherit wins. You can override this behaviour by defining your own do_compile() that does what you want: inherit cmake inherit setuptools3 do_compile() { cmake_do_compile setuptools3_do_compile } (and the same for configure/install). The complication will be if the setuptools3 build assumes that you’ve already _installed_ the cmake build. In that case multiple recipes are the right thing to do. Ross
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61803): https://lists.yoctoproject.org/g/yocto/message/61803 Mute This Topic: https://lists.yoctoproject.org/mt/102977917/21656 Mute #bitbake:https://lists.yoctoproject.org/g/yocto/mutehashtag/bitbake Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/leave/6691583/21656/737036229/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-