[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#964126: krita: Please switch from sip4 to sip5



In data giovedì 2 luglio 2020 12:30:46 CEST, Dmitry Shachnev ha scritto:
> Source: krita
> Version: 1:4.3.0+dfsg-1
> Severity: important
> Usertags: sip5
> 
> Dear Maintainer,
> 
> Recently I have updated pyqt5 and related packages to use sip5 instead of
> sip4 for build. This is in experimental for now, but I want to upload it
> to unstable in a month or two.

Unfortunately it seems krita will require changes to use sip5.
You can see how krita checks for, and uses SIP looking at the following
files:
cmake/modules/FindPyQt5.cmake
cmake/modules/FindPyQt5.py
cmake/modules/FindSIP.cmake
cmake/modules/FindSIP.py
cmake/modules/SIPMacros.cmake
plugins/extensions/pykrita/sip/*

I found this upstream bug report:
https://bugs.kde.org/show_bug.cgi?id=415743
which links to some Arch Linux patch:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/krita-pyqt5-sip5.patch?h=packages/krita
which is:

  diff --git a/cmake/modules/FindPyQt5.py b/cmake/modules/FindPyQt5.py
  index 5849f40868..a42ba6c624 100644
  --- a/cmake/modules/FindPyQt5.py
  +++ b/cmake/modules/FindPyQt5.py
  @@ -3,7 +3,7 @@
   # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
   
   import PyQt5.Qt
  -import sys
  +import sys, site
   import os.path
   
   print("pyqt_version:%06.0x" % PyQt5.Qt.PYQT_VERSION)
  @@ -30,7 +30,7 @@ except ValueError:
       pass
   
   # FIXME This next line is just a little bit too crude.
  -pyqt_sip_dir = os.path.join(sys.prefix, "share", "sip", "PyQt5")
  +pyqt_sip_dir = os.path.join(site.getsitepackages()[0], "PyQt5", "bindings")
   print("pyqt_sip_dir:%s" % pyqt_sip_dir)
   
   print("pyqt_sip_flags:%s" % PyQt5.Qt.PYQT_CONFIGURATION["sip_flags"])

It looks to me that patch addresses only the "build with PyQt5 compiled
with sip5" issue, and it still relies on sip4 to build (see the
aforementioned FindSIP.* files above). If so, this means one possibility
can be to switch to the PyQt5-build-with-sip5 for this bug, and then
later deal with sip5 at all.

In any case, I don't have much experience with sip & PyQt. If you have
some time to investigate it, and possibly send a merge request upstream
(see https://invent.kde.org/graphics/krita), that'd be awesome.

-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: