RuntimeError: the foo_a module failed to register with the sip module

Phil Thompson phil at riverbankcomputing.com
Mon Jan 25 12:00:11 GMT 2021


On 25/01/2021 07:59, Marian Thomsen wrote:
> Hello,
> 
> I get this error when trying to do %import foo_a.sip in foo_b.sip.
> I try to import and use foo_b in the test_b.py file.
> 
> This is my project structure:
> 
> module_b     foo_b.cpp
>                        foo_b.h
>                        project.toml
>                        foo_b.sip   <-- here I try to %import foo_a.sip
>                        test_b.py
> 
> module_a     foo_a.cpp
>                        foo_a.h
>                        project.toml
>                        foo_a.sip
>                        test_a.py
> 
> In each project module has its own dependencies in the .toml file
> under [tool.sip.bindings.foo_x ]. The dependencies of module_a are
> included under [tool.sip.bindings.foo_b].
> If I include a seperate binding set in the .toml file of module_b like
> [tool.sip.bindings.foo_a], I must define sip-module under
> [tool.sip.project] and I get another error.
> 
> What is the best way to include module_a in module_b and still be able
> to build each module seperatly with sip-install?

See the example in the docs...

https://www.riverbankcomputing.com/static/Docs/sip/examples.html#package-projects

Phil


More information about the PyQt mailing list