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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2024-01-04 17:15:46 +02:00 committed by Kieran Bingham
parent 3a74a36316
commit 3e4a211ff4

View file

@ -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):