[PyQt] PyQt5 5.7.1 Bug: debug build on Windows broken

Phil Thompson phil at riverbankcomputing.com
Tue Jan 17 12:01:14 GMT 2017


On 16 Jan 2017, at 9:44 pm, Mathias Born <mathias.born at gmx.de> wrote:
> 
>> From: Phil Thompson [mailto:phil at riverbankcomputing.com]
>> Sent: Montag, 16. Januar 2017 10:14
>> To: Mathias Born <mathias.born at gmx.de>
>> Cc: pyqt at riverbankcomputing.com
>> Subject: Re: [PyQt] PyQt5 5.7.1 Bug: debug build on Windows broken
>> 
>> On 15 Jan 2017, at 9:44 pm, Mathias Born <mathias.born at gmx.de> wrote:
>>> 
>>> Still doesn't work for me.
>>> 
>>> I installed the new SIP snapshot and tried to install the new PyQt
> snapshot.
>>> There are two problems. The PyQt configure.py does not call sip with the
>> new
>>> "-D" command line option for debug builds. I get the same error message.
>> 
>> Are you sure you are running configure.py with a debug version? Does
>> sys.gettotalrefcount exist?
> 
> No, I did not.
> 
>>> But even if I hack configure.py to add "-D", I still get the same error
>>> message:
>> 
>> Did you hack it in both places?
> 
> No, only in one. It was just a hack :-)
> 
> Anyway, this is how I finally made it to work:
> 
> I've run configure.py with the debug version "python_d.exe", with
> option " --debug".
> This compiled and installed successfully.
> However, all PyQt modules were still linking to the wrong python DLL.
> (There are separate DLLs for the limited and the full API on Windows.)
> I had to change line 741 of PyQt's configure.py:
> 
>             # See if we are using the limited API.
>             if not self.py_debug and (py_major == 3 and py_minor >= 4):
> 
> This is important because my application which embeds Python and PyQt
> also makes use of boost::python, which is incompatible with the limited API.
> That's why I always have to link to the full API DLL, and it looks like you
> can't have
> PyQt link to the limited API at the same time in a debug build.
> Surprisingly, this works in a release build.
> 
> That fact that you have to run configure.py using "python_d.exe" should be
> clearly
> explained in the docs. And then, is there still need for the "--debug"?
> 
> It would be nice if there were an option to disable the use of the limited
> API for
> release builds.

I've added a --link-full-dll option to configure.py to force the full API DLL to be linked. You should only need --debug if you want to build debug versions of the PyQt modules.

Phil


More information about the PyQt mailing list