PyQt6 build for debug python build

John Ehresman jpe at wingware.com
Fri Apr 29 19:50:26 BST 2022


I had to make one change to get PyQt6 to build with a debug python build using Python 3.10 because the limited api is not used.

In sip/QtCore/qbytearray.sip, I changed %BIGetBufferCode for QByteArray to what it was in PyQ5 --
 
%BIGetBufferCode
    #if defined(Py_LIMITED_API)
        Q_UNUSED(sipSelf);
    
        sipBuffer->bd_buffer = sipCpp->data();
        sipBuffer->bd_length = sipCpp->size();
        sipBuffer->bd_readonly = 0;
        sipRes = 0;
    #else
        sipRes = PyBuffer_FillInfo(sipBuffer, sipSelf, sipCpp->data(),
                sipCpp->size(), 0, sipFlags);
    #endif
%End

I suspect I may be one of the few people left using debug python builds, but I do find them invaluable when trying to use a C++ debugger.

Thanks,

John


More information about the PyQt mailing list