[libcamera-devel] [PATCH 9/9] libcamera: Add a check for the yaml module

Kieran Bingham kieran.bingham at ideasonboard.com
Wed Sep 23 22:18:32 CEST 2020


On 23/09/2020 16:15, Ricardo Ribalda wrote:
> Yaml is not installed by default, so it needs to be checked during
> configuration for its presence.
> 
> At this point we are aiming for meson_version >= 0.47, and the python
> module detection has been introduced in 0.51, so the fix is added in a
> comment under FIXME.
> 
> Signed-off-by: Ricardo Ribalda <ricardo at ribalda.com>
> ---
>  src/libcamera/meson.build | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index 0e6ecf5..43a5fde 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -77,6 +77,9 @@ if libudev.found()
>      ])
>  endif
>  
> +#FIXME to be added if we force meson version >= 0.51.0
> +#py = import('python').find_installation('python3', modules : ['yaml'])
> +

Indeed, this came up in a previous discussion somewhere.

Having it as an explicitly disabled addition seems like a good idea to
me - but I'd change FIXME for TODO which is our usual style of stating
something needs to be done later.

With that, I think this is helpful to 'pre-add', and sometime soon I'm
sure we'll end up bumping the meson version.

I'm already working on a patch which would require an as yet unreleased
meson ;-)

So with TODO instead of FIXME:

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

>  gen_controls = files('gen-controls.py')
>  
>  control_sources = []
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list