sip5 question / failed to register with the sip module

michael h <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAD0nt=GOXiAEhg9oqJ0+=bKuJAJ+wEH9=B5AUjKDEozBMJpn3A@mail.gmail.com>
I'm attempting to upgrade a project so an extension module is built using
sip5. The extension module wraps another Qt5 based library (poppler-qt5).
This is on Windows 10 and I'm building 32-bit binaries.

I installed PyQt5 v5.14.0 and sip v5.0.1 from pypi and created a
pyproject.toml file for the extension module. I am using the .sip files
from the PyQt5-5.14.0.tar.gz source files.

When running `sip-build` I got the following error message:
sip-build: Q_PID is undefined

(I'm not using anything from qprocess.sip myself, so I just commented the
line/method in the .sip file using that typedef and moved on, I just
thought it was worth mentioning the possible bug, since these are the
unmodified .sip files from the PyQt release.)

After that modification I was able to build the extension, but when I
import the extension module I get an error:

RuntimeError: the PyQt5.QtCore module failed to register with the sip module

I guessed at this being related to PyQt5 having a private sip module, so I
tried to use `PyQt5.sip` as the sip module name but I got the following
error:

sip-build: popplerqt5 must be part of a project when used with a shared
'sip' module

I removed the check in sip's bindings.py to see if it would work. The
module was built and now works but I'm concerned about the number of
workarounds I'm employing here so I was hoping someone could comment on
whether there's a more proper approach for me to use.

Thanks,
michael

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.