Subject: Re: bug#31637: PyQt is broken.

From: Efraim Flashner <[email-masked]>
Date: Sat, 2 Jun 2018 23:49:21 +0300

On Tue, May 29, 2018 at 09:50:00AM +0000, Fis Trivial wrote:
> 
> $ guix --version
> 
> guix (GNU Guix) 6fe165770539a4551b303dc5cd52db6c51c7604a
> 
> Here is the last part of build log:
> 
> make[1]: Entering directory '/tmp/guix-build-python-pyqt-5.9.drv-0/PyQt5_gpl-5.9/QtTest'
> /tmp/guix-build-python-pyqt-5.9.drv-0/PyQt5_gpl-5.9/QtTest/sipQtTestQTest.cpp: In function ‘PyObject* meth_QTest_waitForEvents(PyObject*, PyObject*)’:
> /tmp/guix-build-python-pyqt-5.9.drv-0/PyQt5_gpl-5.9/QtTest/sipQtTestQTest.cpp:278:14: error: ‘waitForEvents’ is not a member of ‘QTest’
> make[1]: *** [Makefile:545: sipQtTestQTest.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory '/tmp/guix-build-python-pyqt-5.9.drv-0/PyQt5_gpl-5.9/QtTest'
> make: *** [Makefile:596: sub-QtTest-make_first-ordered] Error 2
> phase `build' failed after 234.0 seconds
> builder for `/gnu/store/066dx7j5ppr5by97f6kjv17zln22qz90-python-pyqt-5.9.drv' failed with exit code 1
> cannot build derivation `/gnu/store/b35912gkxppr8xp229qqv6zq3hgm3vgl-lightgbm-2.0.12.drv': 1 dependencies couldn't be built
> guix package: error: build failed: build of `/gnu/store/b35912gkxppr8xp229qqv6zq3hgm3vgl-lightgbm-2.0.12.drv' failed

Here's what I have so far for fixing it, it does fail later on though

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c3d0bff2f..429571fab 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1509,7 +1509,7 @@ message.")))
 (define-public python-sip
   (package
     (name "python-sip")
-    (version "4.19.3")
+    (version "4.19.8")
     (source
       (origin
         (method url-fetch)
@@ -1518,7 +1518,7 @@ message.")))
                          "sip-" version "/sip-" version ".tar.gz"))
         (sha256
          (base32
-          "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
+          "1g4pq9vj753r2s061jc4y9ydzgb48ibhc9bdvmb8mlyllwp7mbvy"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("python" ,python-wrapper)))
@@ -1572,7 +1572,8 @@ module provides support functions to the automatically generated code.")
 (define-public python-pyqt
   (package
     (name "python-pyqt")
-    (version "5.9")
+    ;(version "5.9")
+    (version "5.10.1")
     (source
       (origin
         (method url-fetch)
@@ -1582,7 +1583,8 @@ module provides support functions to the automatically generated code.")
                          version ".tar.gz"))
         (sha256
          (base32
-          "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
+          ;"15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
+          "1vz9c4v0k8azk2b08swwybrshzw32x8djjpq13mf9v15x1qyjclr"))
        (patches (search-patches "pyqt-configure.patch"))))
     (build-system gnu-build-system)
     (native-inputs
@@ -1610,6 +1612,12 @@ module provides support functions to the automatically generated code.")
                   ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-build-with-qt-5.11
+           ;; See: https://bugs.gentoo.org/654742
+           (lambda _
+             (substitute* "sip/QtTest/qtestmouse.sip"
+               (("void waitForEvents\\(\\) /ReleaseGIL/;") ""))
+             #t))
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))