[PyQt] problems porting a project from sip4 to sip5
Phil Thompson
phil at riverbankcomputing.com
Fri Apr 17 09:51:01 BST 2020
On 16/04/2020 23:52, Steve Borho wrote:
> Hello,
>
> I maintain a couple of relates SIP projects that I am trying to port
> to sip5 and binary wheel distributions. To keep things simple, lets
> say there is a C++ library for a widget foo, and Python wrappers that
> we’ll call pyfoo.
>
> I have written a pyproject.toml for pyfoo such that sip-wheel can
> generate wheels which install a “foo” python package containing a
> pyfoo.so shared library. This wheel is 100% functional.
>
> Next I have a fooapp which uses PyQt5 and has its own C++ functions
> which compile against Qt and the foo C++ library. This gets compiled
> into qtfoo.so and it’s SIP wrapper includes:
>
> %Import QtGui/QtGuimod.sip
> %Import QtWidgets/QtWidgetsmod.sip
> %Import QtNetwork/QtNetworkmod.sip
> %Import foomod.sip
>
> I have written a pyproject.toml for fooapp that sip-build can compile
> into a qtfoo.so and sip-wheel can create a wheel for it. But no
> matter how I try and load the qtfoo.so it always errors with the
> message:
>
> from .qtfoo import get_qtfoo_version
> RuntimeError: the foo.pyfoo module failed to register with the sip
> module
>
> I get this error even though the previous line of Python code was able
> to import pyfoo.so from the foo package. There is a binary dependency
> here that I can’t determine.
>
> I read the documentation about standalone and package modules, and
> followed the steps to make a foo-sip wheel that installs
> foo/bindings/pyfoo/foomod.sip and the other sip files, but this did
> not seem to help with the library interdependency.
>
> I’m missing something basic, any hints on where to look?
https://www.riverbankcomputing.com/static/Docs/PyQt5/pyqt_builder.html
Phil
More information about the PyQt
mailing list