[libcamera-devel] [PATCH] py: Fix gen-py-control-enums.py reference
Tomi Valkeinen
tomi.valkeinen at ideasonboard.com
Tue May 10 18:02:45 CEST 2022
On 10/05/2022 18:21, Kieran Bingham wrote:
> Scripts should be referenced using the meson files() directive to ensure
> the location is correctly identified with the relevant paths. This
> prevents compilation failures if the working directory does not match
> the source tree.
>
> Fixes: 6e92cb9dc49e ("py: Generate control enums from yaml")
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> It seems in my testing, that this occurs on meson 57 and below, but
> wasn't reproduced on meson 58. This fixes the issue anyway, and ensures
> we are consistent in our usage of scripts internally.
> ---
> src/py/libcamera/meson.build | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
> index 842db1ed3ddd..0cd7c75bb86c 100644
> --- a/src/py/libcamera/meson.build
> +++ b/src/py/libcamera/meson.build
> @@ -22,10 +22,12 @@ gen_input_files = [
> 'pyenums_generated.cpp.in',
> ]
>
> +gen_py_control_enums = files('gen-py-control-enums.py')
> +
> generated_sources = custom_target('py_gen_controls',
> input : gen_input_files,
> output : ['pyenums_generated.cpp'],
> - command : ['gen-py-control-enums.py', '-o', '@OUTPUT@', '@INPUT@'])
> + command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@'])
>
> pycamera_sources += generated_sources
>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
Tomi
More information about the libcamera-devel
mailing list