[libcamera-devel] [PATCH v2 02/13] py: meson: add pystubs build target
Tomi Valkeinen
tomi.valkeinen at ideasonboard.com
Wed May 18 08:43:45 CEST 2022
On 17/05/2022 19:21, Kieran Bingham wrote:
> Quoting Tomi Valkeinen (2022-05-17 15:33:14)
>> Add a 'pystubs' build target for building the python stubs.
>>
>> For now this needs to be ran manually. I didn't figure out how to
>> generate the stubs after the libcamera bindings are built.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
>
> Hrm ... It sounds like this wants to be some sort of post-build step.
>
> Searching quickly seems to find only things like:
> https://github.com/mesonbuild/meson/issues/2957
>
> Which seems to suggest a custom target (which is the full target, to
> build pycamera, and the stubs?) and have it depend on the pycamera
> shared_module().
>
> But I'm not sure if that's a full understanding of what you're trying to
> achieve here.
>
> Anyway, having a target is better than expecting a user to execute a
> manual command successfully - (but I fear at the moment, this won't get
> used directly?)
I think custom_target doesn't work, as this can only be built when doing
a native build. You have to be able to use the produced bindings module
to be able to run stubgen.
I expect that the stubs would eventually be something that are committed
to the repository, and updated when needed.
As we also have the meson 0.57 requirement... Maybe I'll just leave this
out for now.
Tomi
More information about the libcamera-devel
mailing list