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

Marian Thomsen marian.th at outlook.de
Mon Jan 25 13:43:45 GMT 2021


That is almost how I configured everything, except I do not have a toplevel package so I left everything out that containes examples.sip.

Also the package project example does not show the content from examples.sip. What does it contain and where should it be?
________________________________
Von: Phil Thompson <phil at riverbankcomputing.com>
Gesendet: Montag, 25. Januar 2021 13:00
An: Marian Thomsen <marian.th at outlook.de>
Cc: pyqt at riverbankcomputing.com <pyqt at riverbankcomputing.com>
Betreff: Re: RuntimeError: the foo_a module failed to register with the sip module

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://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.riverbankcomputing.com%2Fstatic%2FDocs%2Fsip%2Fexamples.html%23package-projects&data=04%7C01%7C%7C9c5c119107dd4584c09e08d8c128c558%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637471728146148982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kUMQQ6sNSVTSPzobaE9KnaR5myTT%2B4R%2Bf8RdRZ4uctM%3D&reserved=0

Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210125/cba9da18/attachment.htm>


More information about the PyQt mailing list