Message ID | 20240104151548.2589-7-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Laurent Pinchart <laurent.pinchart@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@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@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):
Quoting Laurent Pinchart via libcamera-devel (2024-01-04 15:15:46) > 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: Kieran Bingham <kieran.bingham@ideasonboard.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): > -- > Regards, > > Laurent Pinchart >
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):
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> --- utils/ipc/generate.py | 2 ++ 1 file changed, 2 insertions(+)