From 3e4a211ff482f4a91fafec2c623c5b4e046ffdec Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 4 Jan 2024 17:15:46 +0200 Subject: utils: ipc: generate.py: Add bindings directory to Python path 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 Reviewed-by: Milan Zamazal Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- utils/ipc/generate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/ipc/generate.py b/utils/ipc/generate.py index 8771e0a6..afaf018b 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): -- cgit v1.2.1