[libcamera-devel] [PATCH 6/8] utils: ipc: generate.py: Add bindings directory to Python path
Milan Zamazal
mzamazal at redhat.com
Fri Jan 5 11:09:50 CET 2024
Laurent Pinchart <laurent.pinchart at ideasonboard.com> writes:
> Newer mojo versions import a 'checks' module located in the bindings
> directory. In preparation for a mojo update, add the directory to the
> Python path make the import work.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal at redhat.com>
> ---
> utils/ipc/generate.py | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/utils/ipc/generate.py b/utils/ipc/generate.py
> index 8771e0a6b9e3..afaf018b49d1 100755
> --- a/utils/ipc/generate.py
> +++ b/utils/ipc/generate.py
> @@ -12,6 +12,8 @@ import sys
> # TODO set sys.pycache_prefix for >= python3.8
> sys.dont_write_bytecode = True
>
> +sys.path.insert(0, f'{os.path.dirname(__file__)}/mojo/public/tools/bindings')
> +
> import mojo.public.tools.bindings.mojom_bindings_generator as generator
>
> def _GetModulePath(path, output_dir):
More information about the libcamera-devel
mailing list