<table><tr><td style="">arojas updated this revision to Diff 40570.<br />arojas retitled this revision from "Compile python bindings with the same sipname used by PyQt" to "Compile python bindings with the same sip flags used by PyQt".<br />arojas edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-nrdconhxsujjsob/">(Show Details)</a>
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15091">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>RuntimeError: the PyQt5.QtCore module failed to register with the sip module<br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Unfortunately the solution is not as easy as checking the PyQt version,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">To fix this, we compile KF5 bindings using the same sip flags (name and tags) that PyQt was compiled with. This ensures that we always use the correct sip name.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">since some distros (such as Debian) patch PyQt to use the default 'sip' sipname.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">We also stop setting the sip tags in FindPythonModuleGeneration.cmake to avoid duplication,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Instead we read the sipname PyQt was compiled with from PYQT_CONFIGURATION and use it to compile the KF5 bindings</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">and remove a (seemingly) unnecessary check for the Qt version that was forcing PyQt to be rebuilt for every patch Qt update</span>.<br />
</div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R240 Extra CMake Modules</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D15091?vs=40479&id=40570">https://phabricator.kde.org/D15091?vs=40479&id=40570</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15091">https://phabricator.kde.org/D15091</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>find-modules/FindPythonModuleGeneration.cmake<br />
find-modules/run-sip.py</div></div></div><br /><div><strong>To: </strong>arojas, Frameworks, bruns<br /><strong>Cc: </strong>rdieter, kde-frameworks-devel, kde-buildsystem, michaelh, ngraham, bruns<br /></div>