Skip to content

Add support for SIP v5

Dmitry Shachnev requested to merge dmitryshachnev/krita:sip5 into master
  • SIP v5 was released in October 2019.
  • Since December 2019, the official PyQt5 packages on PyPI are built with it.
  • Some distros, e.g. ArchLinux, are now building PyQt5 with SIP v5 too.

In SIP v5, there are several major changes that affect Krita:

  • There is no more sipconfig Python module. In fact, it was deprecated since at least June 2014. There is a new sipbuild module, but it has a completely different API.
    • I have removed FindSIP.py, and changed FindSIP.cmake to look at the executable rather than the Python module. Some variables we got from FindSIP.py were not really used, so I removed them.
  • The program name is sip5 instead of sip. To be more precise, “sip5 is a drop-in replacement for the sip code generator included with SIP v4”.
    • The code supports both names now, with sip5 being preferred.
  • There is no more sip.h file in Python include path.
    • I added a call to sip-module which generates sip.h in the current directory.
  • When PyQt5 is built with SIP v5, its .sip files are installed to a different location, like /usr/lib/python3/dist-packages/PyQt5/bindings/.
    • I copied the logic from sip itself, with a fall back to previous location if the new one does not exist.

Test Plan

I tested the following things (thanks to @pino who suggested that):

  • SettingsConfigure KritaPython Plugin Manager has 15 items. Clicking on each shows the description/help for it.
  • A simple script ToolsScriptsTen brushes works.
  • A simple docker SettingsDockersRecent documents works.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
    • I am asking for help here :) I guess the relevant tests are in plugins/python, how to run them?
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports

Loading