Message ID | 20220510152107.610191-1-kieran.bingham@ideasonboard.com |
---|---|
State | Accepted |
Commit | 226563607ea888c0af49bf3cdc7b3654d6a50089 |
Headers | show |
Series |
|
Related | show |
Hi Kieran, Thank you for the patch. On Tue, May 10, 2022 at 05:21:07PM +0200, Kieran Bingham via libcamera-devel 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@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. > --- Looks good to me, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> I would still like to see a patch to use files() for gen_input_files too. I understand that Tomi is on it. > 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
Hi Kieran, Thanks for the patch, On 5/10/22 20:51, Kieran Bingham via libcamera-devel 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@ideasonboard.com> Makes sense, Reviewed-by: Umang Jain <umang.jain@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 >
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@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@ideasonboard.com> Tomi
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
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@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(-)