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

2024-01-13 Thread Dmitry Shachnev
Control: retitle -1 krita: Please switch from sip4 to sip6

Hi again!

On Mon, Sep 21, 2020 at 02:24:04PM +0300, Dmitry Shachnev wrote:
> I have an update on PyQt5 vs. SIP 5 status.
>
> Unfortunately, things got a bit more complicated recently. Upstream is
> going to release SIP 6 in the beginning of next year, which will be not
> co-installable together with SIP 5, and which will not have /usr/bin/sip5
> “legacy” script:
>
> https://www.riverbankcomputing.com/pipermail/pyqt/2020-September/043201.html
> https://www.riverbankcomputing.com/pipermail/pyqt/2020-September/043162.html
>
> sip5 was a script to ease upgrades from SIP 4, and it has a set of options
> similar to SIP 4's /usr/bin/sip. Upstream now recommends using their new
> tools, sip-build and similar ones. See the documentation:
>
> https://www.riverbankcomputing.com/static/Docs/sip/
>
> This means that next year we will have SIP 4 and SIP 6 in Debian, but not
> SIP 5. My upstream work on Krita made use of /usr/bin/sip5, so it will need to
> be ported to the new tools in order to support SIP 6 (and PyQt6).
>
> At the same time, upstream says that it will remain possible to compile
> applications with SIP 4 even when PyQt5 uses newer SIP. So now I think the
> best plan is:
>
> - Please keep using SIP 4 for Krita for now.
> - Please test that it still works fine with PyQt5 in experimental.
> - Ask upstream to migrate to the new tools to be prepared for SIP 6 / PyQt6.

Another update on this.

It looks like upstream integrated proper support [1] for SIP 5+ a couple of
years ago, and a recent commit [2] indicates that it builds with the latest
version, 6.8, too.

So please switch from SIP 4 to SIP 6, maybe picking the needed commit(s) from
upstream.

From packaging standpoint that will mean:

- Build-depending on sip-tools and python3-sipbuild instead of
  python3-sip-dev.

- Dropping Recommends: python3-sip. Recommends already has python3-pyqt5,
  which ensures the presence of proper SIP runtime.

SIP 4 has an RC bug related to Python 3.12 [3] and it's unlikely to be fixed.

[1]: 
https://invent.kde.org/graphics/krita/-/commit/5bb4874ad04b771a0fec12827de748780b5b395b
[2]: 
https://invent.kde.org/graphics/krita/-/commit/2d71c47661d43a4e3c1ab0c27803de980bdf2bb2
[3]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059648

--
Dmitry Shachnev


signature.asc
Description: PGP signature


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

2024-01-13 Thread Debian Bug Tracking System
Processing control commands:

> retitle -1 krita: Please switch from sip4 to sip6
Bug #964126 [src:krita] krita: Please switch from sip4 to sip5
Changed Bug title to 'krita: Please switch from sip4 to sip6' from 'krita: 
Please switch from sip4 to sip5'.

-- 
964126: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964126
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



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

2020-09-21 Thread Dmitry Shachnev
Hi again Pino!

On Fri, Jul 03, 2020 at 06:19:29PM +0300, Dmitry Shachnev wrote:
> Hi Pino!
>
> On Thu, Jul 02, 2020 at 01:37:54PM +0200, Pino Toscano wrote:
> > [...]
> >
> > 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.
>
> Working on it. Hopefully I will have it ready in a couple of days.

I have an update on PyQt5 vs. SIP 5 status.

Unfortunately, things got a bit more complicated recently. Upstream is
going to release SIP 6 in the beginning of next year, which will be not
co-installable together with SIP 5, and which will not have /usr/bin/sip5
“legacy” script:

https://www.riverbankcomputing.com/pipermail/pyqt/2020-September/043201.html
https://www.riverbankcomputing.com/pipermail/pyqt/2020-September/043162.html

sip5 was a script to ease upgrades from SIP 4, and it has a set of options
similar to SIP 4's /usr/bin/sip. Upstream now recommends using their new
tools, sip-build and similar ones. See the documentation:

https://www.riverbankcomputing.com/static/Docs/sip/

This means that next year we will have SIP 4 and SIP 6 in Debian, but not
SIP 5. My upstream work on Krita made use of /usr/bin/sip5, so it will need to
be ported to the new tools in order to support SIP 6 (and PyQt6).

At the same time, upstream says that it will remain possible to compile
applications with SIP 4 even when PyQt5 uses newer SIP. So now I think the
best plan is:

- Please keep using SIP 4 for Krita for now.
- Please test that it still works fine with PyQt5 in experimental.
- Ask upstream to migrate to the new tools to be prepared for SIP 6 / PyQt6.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


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

2020-07-03 Thread Dmitry Shachnev
Hi Pino!

On Thu, Jul 02, 2020 at 01:37:54PM +0200, Pino Toscano wrote:
> [...]
>
> 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.

Working on it. Hopefully I will have it ready in a couple of days.

--
Dmitry Shachnev


signature.asc
Description: PGP signature


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

2020-07-02 Thread Pino Toscano
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

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


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

2020-07-02 Thread Dmitry Shachnev
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.

This change breaks PyQt5 extension ABI, so all packages build-depending on
pyqt5-dev need to build with sip5 too.

Quick migration guide:

1) Build-depend on python3-sipbuild(-dbg) and sip5-tools.

   - Inspect pyproject.toml (if it exists) for additional dependencies, maybe
 you will need also python3-pyqtbuild.

2) If your package has a project.py file, call sip-build to build it.
   For separation of configure and build phases, pass --no-make to it.

3) If your package does not have a project.py file, but has a configure.py,
   update that file to the latest version of the boilerplate (v2.16), which
   you can find in the experimental version of qscintilla2 package.

   (Qscintilla2's configure.py used to be a recommended way to build sip
   projects.)

4) If your package called /usr/bin/sip directly, call /usr/bin/sip5 instead.

5) If your package had a runtime dependency on python3-sip or ${sip3:Depends},
   depend on python3-pyqt5.sip instead. There is no analogue for dh_sip3
   helper yet.

   (Upstream now recommends each project to use its own private copy of sip.
   In Debian, I recommend you to use pyqt5's copy which is python3-pyqt5.sip).

6) If you build a -dev package with .sip files, they are now installed into
   a new location (in dist-packages). Also .toml files now should be present.

You can see what I have done in pyqt5, pyqt5chart, pyqt5webengine and
qscintilla2 packages in experimental (see the relevant commits in git).

The official documentation for sip5 is available online [1] or in sip5-doc
package. For help you can ask me or pyqt/sip mailing list [2] (subscription
needed to post messages).

Please stage your changes in experimental (or in a VCS) for now. They will
need to be uploaded to unstable together with pyqt5.

[1]: https://www.riverbankcomputing.com/static/Docs/sip/
[2]: https://www.riverbankcomputing.com/mailman/listinfo/pyqt

--
Dmitry Shachnev


signature.asc
Description: PGP signature