[libcamera-devel,v3,01/18] py: meson: use files() for custom_target input files
diff mbox series

Message ID 20220518131329.66994-2-tomi.valkeinen@ideasonboard.com
State Accepted
Headers show
Series
  • Misc Python bindings patches
Related show

Commit Message

Tomi Valkeinen May 18, 2022, 1:13 p.m. UTC
Use files() for the input files for the custom_target(). I believe the
current code works, but perhaps it is safer to use files() here.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/py/libcamera/meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kieran Bingham May 18, 2022, 2:07 p.m. UTC | #1
Quoting Tomi Valkeinen (2022-05-18 14:13:12)
> Use files() for the input files for the custom_target(). I believe the
> current code works, but perhaps it is safer to use files() here.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/py/libcamera/meson.build | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
> index 2fc2eaec..cd20bb00 100644
> --- a/src/py/libcamera/meson.build
> +++ b/src/py/libcamera/meson.build
> @@ -17,10 +17,10 @@ pycamera_sources = files([
>      'pymain.cpp',
>  ])
>  
> -gen_input_files = [
> -    meson.project_source_root() / 'src' / 'libcamera' / 'control_ids.yaml',
> +gen_input_files = files([
> +    '../../libcamera/control_ids.yaml',

Fine by me, but I wonder if we should set control_ids.yaml in a meson
files() definition in the libcamera tree directly. But it probably only
makes a difference if there's another user of this ...

But - this is probably sufficient for now, as the usage of that to
create the controls is more complex to support multiple headers. No
point changing that for the sake of this.


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

>      'pyenums_generated.cpp.in',
> -]
> +])
>  
>  gen_py_control_enums = files('gen-py-control-enums.py')
>  
> -- 
> 2.34.1
>

Patch
diff mbox series

diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build
index 2fc2eaec..cd20bb00 100644
--- a/src/py/libcamera/meson.build
+++ b/src/py/libcamera/meson.build
@@ -17,10 +17,10 @@  pycamera_sources = files([
     'pymain.cpp',
 ])
 
-gen_input_files = [
-    meson.project_source_root() / 'src' / 'libcamera' / 'control_ids.yaml',
+gen_input_files = files([
+    '../../libcamera/control_ids.yaml',
     'pyenums_generated.cpp.in',
-]
+])
 
 gen_py_control_enums = files('gen-py-control-enums.py')