Bug#964125: calibre: Please switch from sip4 to sip5
On Fri, 25 Sep 2020, Dmitry Shachnev wrote: > Yes. I am again sorry for this disruptive change, but it had to happen > sooner or later. No problem, incidentally calibre 5.0 was released the same day and already uploaded (5.0.1), so breakage was minimal. Thanks for your work! Norbert -- PREINING Norbert https://www.preining.info Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Bug#964125: calibre: Please switch from sip4 to sip5
Hi Norbert! On Fri, Sep 25, 2020 at 11:26:25AM +0900, Norbert Preining wrote: > Hi Dmitry, > > > And this is done now. PyQt5 in unstable now uses SIP 5. > > Is this also the reason why calibre is now broken? Yes. I am again sorry for this disruptive change, but it had to happen sooner or later. > If yes, you could have added a breaks calibre <= ... - and probably some > other packages, too. I don't like "<=" breaks because there is no promise that a newer version will be not broken. Once there's a fixed version, I will add a "<<" Breaks. -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#964125: calibre: Please switch from sip4 to sip5
Hi Dmitry, > And this is done now. PyQt5 in unstable now uses SIP 5. Is this also the reason why calibre is now broken? $ calibre Traceback (most recent call last): File "/usr/bin/calibre", line 20, in sys.exit(calibre()) File "/usr/lib/calibre/calibre/gui_launch.py", line 73, in calibre main(args) File "/usr/lib/calibre/calibre/gui2/main.py", line 529, in main app, opts, args = init_qt(args) File "/usr/lib/calibre/calibre/gui2/main.py", line 114, in init_qt app = Application(args, override_program_name=override, windows_app_uid=MAIN_APP_UID) File "/usr/lib/calibre/calibre/gui2/__init__.py", line 885, in __init__ raise RuntimeError('Failed to load the progress_indicator C extension, with error: {}'.format(pi_err)) RuntimeError: Failed to load the progress_indicator C extension, with error: PyCapsule_GetPointer called with incorrect name $ ??? If yes, you could have added a breaks calibre <= ... - and probably some other packages, too. Best Norbert -- PREINING Norbert https://www.preining.info Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Bug#964125: calibre: Please switch from sip4 to sip5
On Mon, Sep 21, 2020 at 02:28:24PM +0300, Dmitry Shachnev wrote: > Sorry for the delay. I hope I will upload it to unstable before end of > September. And this is done now. PyQt5 in unstable now uses SIP 5. -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#964125: calibre: Please switch from sip4 to sip5
On Sat, Sep 19, 2020 at 09:33:12PM +0900, yokota wrote: > > https://github.com/kovidgoyal/calibre/commit/a4df5cc67ba6ee82 was committed > > yesterday, and with that commit Calibre no longer uses the -b option. > > > > So simply exporting SIP_BIN=sip5 may be enough to make it build with sip5. > > > > For various reasons I have delayed the switch of PyQt5 to sip5, so still no > > need to upload that change right now. > > Thanks for your good news. > > And here is one more piece of news. > Upstream Calibre code now requires sip5 at > https://github.com/kovidgoyal/calibre/commit/7a4b3f61ff24f8c39c8d5cf86c54da9de9267025 Great! > We need new PyQt5 soon. Sorry for the delay. I hope I will upload it to unstable before end of September. (Please CC me on reply, as I am not subscribed to this bug.) -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#964125: calibre: Please switch from sip4 to sip5
> https://github.com/kovidgoyal/calibre/commit/a4df5cc67ba6ee82 was committed > yesterday, and with that commit Calibre no longer uses the -b option. > > So simply exporting SIP_BIN=sip5 may be enough to make it build with sip5. > > For various reasons I have delayed the switch of PyQt5 to sip5, so still no > need to upload that change right now. Thanks for your good news. And here is one more piece of news. Upstream Calibre code now requires sip5 at https://github.com/kovidgoyal/calibre/commit/7a4b3f61ff24f8c39c8d5cf86c54da9de9267025 . We need new PyQt5 soon. -- YOKOTA
Bug#964125: calibre: Please switch from sip4 to sip5
Hi, small update about Calibre vs. SIP situation: On Fri, Jul 03, 2020 at 07:21:53PM +0300, Dmitry Shachnev wrote: > However, indeed it looks like the -b option was removed [2], and sip5 can no > longer generate .sbf files. Calibre's build system (namely get_sip_data() > function) uses those files, so that is a problem :-( https://github.com/kovidgoyal/calibre/commit/a4df5cc67ba6ee82 was committed yesterday, and with that commit Calibre no longer uses the -b option. So simply exporting SIP_BIN=sip5 may be enough to make it build with sip5. For various reasons I have delayed the switch of PyQt5 to sip5, so still no need to upload that change right now. -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#964125: calibre: Please switch from sip4 to sip5
Hi Norbert, On Fri, Jul 03, 2020 at 07:58:38PM +0900, Norbert Preining wrote: > Now it simply does not compile. sip5 seems to be different: > > SIPing 3 files... > sip5 -w -c /tmp/calibre-4.99.4+dfsg+really4.19.0/build/pyqt/pictureflow -b > /tmp/calibre-4.99.4+dfsg+really4.19.0/build/pyqt/pictureflow/pictureflow.sip.sbf > -I/usr/lib/python3/dist-packages/PyQt5/bindings/ -n sip -t WS_X11 -t > Qt_5_14_0 > /tmp/calibre-4.99.4+dfsg+really4.19.0/src/calibre/gui2/pictureflow/pictureflow.sip > usage: sip5 [-h] [-V] [-a FILE] [--abi-version VERSION] [-B TAG] [-c DIR] [-D] > [-e] [-f] [-g] [-I DIR] [-j FILES] [-n NAME] [-o] [-P] [-r] > [-s SUFFIX] [-t TAG] [-w] [-x FEATURE] [-X ID:FILE] [-y FILE] > [FILE] > sip5: error: unrecognized arguments: -b > /tmp/calibre-4.99.4+dfsg+really4.19.0/src/calibre/gui2/pictureflow/pictureflow.sip > > Are you sure that sip(4) and sip5 are actually compatible in any > reasonable way? I expected them to be compatible. The documentation [1] says that “sip5 is a drop-in replacement for the sip code generator included with SIP v4”. However, indeed it looks like the -b option was removed [2], and sip5 can no longer generate .sbf files. Calibre's build system (namely get_sip_data() function) uses those files, so that is a problem :-( I can suggest two ways to fix this: - The build system creates a separate directory for every build file (the "os.makedirs(src_dir, exist_ok=True)" call). So the needed headers and sources can be received by simply looking at what files are in that directory (e.g. using glob module). - Alternatively, if you pass "-j 1" to sip, it will create only one .cpp file, which will make things even simplier. Good news is that all other options used in the command line above are present in sip5. However I noticed one more thing: "-n sip" needs to be replaced with "-n PyQt5.sip". Maybe you can file a bug upstream for this? I see Kovid started some work on sip5 [3] so maybe he will be interested in this? [1]: https://www.riverbankcomputing.com/static/Docs/sip/legacy_command_line_tools.html#sip5 [2]: https://riverbankcomputing.com/hg/sip/rev/f152b2474968 [3]: https://github.com/kovidgoyal/calibre/commit/5ef79c742a87df12 -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#964125: calibre: Please switch from sip4 to sip5
Hi Dmitry, thanks for your remarks and help! > python3-sip-dev is part of sip4, please remove that build-dependency. Done. > If you patched the code to use /usr/bin/sip5, then you need to build-depend > on sip5-tools. Done. > > dh_sip3 -pcalibre-bin > > Please remove it too. dh_sip3 was a helper that added a dependency on Done. > Also please bump build-dependency on pyqt5-dev to 5.15.0+dfsg-1+exp1~, Done. Now it simply does not compile. sip5 seems to be different: SIPing 3 files... sip5 -w -c /tmp/calibre-4.99.4+dfsg+really4.19.0/build/pyqt/pictureflow -b /tmp/calibre-4.99.4+dfsg+really4.19.0/build/pyqt/pictureflow/pictureflow.sip.sbf -I/usr/lib/python3/dist-packages/PyQt5/bindings/ -n sip -t WS_X11 -t Qt_5_14_0 /tmp/calibre-4.99.4+dfsg+really4.19.0/src/calibre/gui2/pictureflow/pictureflow.sip usage: sip5 [-h] [-V] [-a FILE] [--abi-version VERSION] [-B TAG] [-c DIR] [-D] [-e] [-f] [-g] [-I DIR] [-j FILES] [-n NAME] [-o] [-P] [-r] [-s SUFFIX] [-t TAG] [-w] [-x FEATURE] [-X ID:FILE] [-y FILE] [FILE] sip5: error: unrecognized arguments: -b /tmp/calibre-4.99.4+dfsg+really4.19.0/src/calibre/gui2/pictureflow/pictureflow.sip Are you sure that sip(4) and sip5 are actually compatible in any reasonable way? Best Norbert -- PREINING Norbert https://www.preining.info Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Bug#964125: calibre: Please switch from sip4 to sip5
Hi Norbert! On Thu, Jul 02, 2020 at 08:47:53PM +0900, Norbert Preining wrote: > At the moment we do not depend on any of that but solely on > python3-sip-dev > is that enough? python3-sip-dev is part of sip4, please remove that build-dependency. If you patched the code to use /usr/bin/sip5, then you need to build-depend on sip5-tools. > Ok, I switched from ${sip3:Depends} to python3-pyqt5.sip. > Do you guarantee that this is enough and properly superseeds > ${sip3:Depends}? Yes, that should be enough. I forgot to mention that python3-pyqt5 already depends on python3-pyqt5.sip, so you get that dependency even if you do not list it explicitly. > Furthermore, we call > dh_sip3 -pcalibre-bin > what should happen with that? Please remove it too. dh_sip3 was a helper that added a dependency on a sip that the package was built with, but now that build-time and run-time parts of sip are different packages with separate versions (sipbuild and PyQt5.sip), it is hard to provide such a helper. Maybe there will be dh_pyqt5sip some day, but not in the near future. > The changes I made are in the last two commits in the master branch in > https://github.com/norbusan/calibre-debian > > Any comments from your side? If it builds fine, works fine, and does not build-depend or depend on anything from src:sip4 then it's fine. If there are any problems with the above points, please ask me. Also please bump build-dependency on pyqt5-dev to 5.15.0+dfsg-1+exp1~, as it is the first version that ships .sip files in the new location. -- Dmitry Shachnev signature.asc Description: PGP signature
Bug#964125: calibre: Please switch from sip4 to sip5
Hi Dmitry, thanks for the heads-up! But it seems I need some help here: > 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. At the moment we do not depend on any of that but solely on python3-sip-dev is that enough? > 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. No project.py > 3) If your package does not have a project.py file, but has a configure.py, No configure.py > 4) If your package called /usr/bin/sip directly, call /usr/bin/sip5 instead. That I have done for now (with a quilt patch), hopefully. > 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). Ok, I switched from ${sip3:Depends} to python3-pyqt5.sip. Do you guarantee that this is enough and properly superseeds ${sip3:Depends}? Furthermore, we call dh_sip3 -pcalibre-bin what should happen with that? The changes I made are in the last two commits in the master branch in https://github.com/norbusan/calibre-debian Any comments from your side? Best Norbert -- PREINING Norbert https://www.preining.info Accelia Inc. + IFMGA ProGuide + TU Wien + JAIST + TeX Live + Debian Dev GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Bug#964125: calibre: Please switch from sip4 to sip5
Source: calibre Version: 4.99.4+dfsg+really4.19.0-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