Trying to build 5.10.0 on Windows getting PyCapsule_GetPointer error at runtime.

Andrew Cunningham <[email protected]> Mon, 29 Jun 2020 20:29:07 -0700
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAGTJuHjwB8EOaZJoK38kiy6RvUV6_5dPYiY2GeXH8uLknmetMw@mail.gmail.com>
--00000000000020b7f105a944c8d1
Content-Type: text/plain; charset="UTF-8"

For various reasons I need to build an older version of PyQt5 ( 5.10.0) on
windows.
QT version is 5.12.7 (64-bit)
Steps to make this happen

   - Clean python 3.7 installation( no existing SIP or PyQt5)
   - Build and install SIP 4.19.23
   - configure D:\PyQt5_commercial-5.10, build  and install


Yet I get "ValueError: PyCapsule_GetPointer called with incorrect name"
when trying to execute any PyQt5 code

>>> from PyQt5.QtWidgets import  QInputDialog,QLineEdit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: PyCapsule_GetPointer called with incorrect name


How can this happen when I am using the same versions of sip? It seems that
error only occurs when using incompatible SIP versions.

Initial output of configure

Checking to see if the dbus support module should be built...
DBus v1 does not seem to be installed.
Qt v5.12.7 is being used.
The qmake executable is D:\Qt\5.12.7\msvc2017_64\bin\qmake.exe.
Qt is built as a shared library.
SIP 4.19.23 is being used.
The sip executable is C:\Python37\sip.exe.
These PyQt5 modules will be built: QtGui, QtWidgets, QtWinExtras, QtNetwork,
QtOpenGL, QtSvg, QtXml, QtCore.
The PyQt5 Python package will be installed in c:\python37\Lib\site-packages.
PyQt5 is being built with generated docstrings.
The Designer plugin will be installed in
D:/Qt/5.12.7/msvc2017_64/plugins/designer.
The qmlscene plugin will be installed in
D:/Qt/5.12.7/msvc2017_64/plugins/PyQt5.
The PyQt5 PEP 484 stub files will be installed in
c:\python37\Lib\site-packages\PyQt5.
The PyQt5 .sip files will be installed in c:\python37\sip\PyQt5.
pyuic5, pyrcc5 and pylupdate5 will be installed in c:\python37.
The interpreter used by pyuic5 is c:\python37\python.exe.



Andrew

--00000000000020b7f105a944c8d1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>For various reasons I need to build an older version =
of PyQt5 ( 5.10.0) on windows.</div><div>QT version is 5.12.7 (64-bit)</div=
><div>Steps to make this happen</div><div><ul><li>Clean python 3.7 installa=
tion( no existing SIP or PyQt5)<br></li><li>Build and install SIP 4.19.23</=
li><li>configure D:\PyQt5_commercial-5.10, build=C2=A0 and install</li></ul=
><div><br></div><div>Yet I get &quot;ValueError: PyCapsule_GetPointer calle=
d with incorrect name&quot; when trying to execute any PyQt5 code <br></div=
><div><br></div><div>&gt;&gt;&gt; from PyQt5.QtWidgets import =C2=A0QInputD=
ialog,QLineEdit<br>Traceback (most recent call last):<br>=C2=A0 File &quot;=
&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>ValueError: PyCapsule_Get=
Pointer called with incorrect name</div><div><br></div><div><br></div><div>=
How can this happen when I am using the same versions of sip? It seems that=
 error only occurs when using incompatible SIP versions.<br></div><div><br>=
</div><div>Initial output of configure <br></div><div><br></div><div>Checki=
ng to see if the dbus support module should be built...<br>DBus v1 does not=
 seem to be installed.<br>Qt v5.12.7 is being used.<br>The qmake executable=
 is D:\Qt\5.12.7\msvc2017_64\bin\qmake.exe.<br>Qt is built as a shared libr=
ary.<br>SIP 4.19.23 is being used.<br>The sip executable is C:\Python37\sip=
.exe.<br>These PyQt5 modules will be built: QtGui, QtWidgets, QtWinExtras, =
QtNetwork,<br>QtOpenGL, QtSvg, QtXml, QtCore.<br>The PyQt5 Python package w=
ill be installed in c:\python37\Lib\site-packages.<br>PyQt5 is being built =
with generated docstrings.<br>The Designer plugin will be installed in<br>D=
:/Qt/5.12.7/msvc2017_64/plugins/designer.<br>The qmlscene plugin will be in=
stalled in<br>D:/Qt/5.12.7/msvc2017_64/plugins/PyQt5.<br>The PyQt5 PEP 484 =
stub files will be installed in<br>c:\python37\Lib\site-packages\PyQt5.<br>=
The PyQt5 .sip files will be installed in c:\python37\sip\PyQt5.<br>pyuic5,=
 pyrcc5 and pylupdate5 will be installed in c:\python37.<br>The interpreter=
 used by pyuic5 is c:\python37\python.exe.</div><div><br></div><div><br></d=
iv><div><br></div><div>Andrew<br></div></div></div>

--00000000000020b7f105a944c8d1--