diff mbox

[2/3] gnu: python-pyqt-5.5: Use non-inherited "configure" phase.

Message ID 1480929178-6383-3-git-send-email-h.goebel@crazy-compilers.com
State New
Headers show

Commit Message

Hartmut Goebel Dec. 5, 2016, 9:12 a.m. UTC
This allows passing different options for 5.5 than for the main version
(which is currently 5.6).

* gnu/packages.qt.scm (python-pyqt-5.5, python2-pyqt-5.5)[arguments]: Copy
from (python-pyqt)[arguments].
---
 gnu/packages/qt.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Hartmut Goebel Dec. 5, 2016, 12:44 p.m. UTC | #1
Am 05.12.2016 um 10:12 schrieb Hartmut Goebel:
> * gnu/packages.qt.scm (python-pyqt-5.5, python2-pyqt-5.5)[arguments]: Copy
> from (python-pyqt)[arguments].

@ricardo: Despite our discussion on Saturday I did simply copy the
phase. This is much easier than creating a function to return the phase.
Thanks for taking the time, tough.
Efraim Flashner Dec. 8, 2016, 9:19 p.m. UTC | #2
On Mon, Dec 05, 2016 at 10:12:57AM +0100, Hartmut Goebel wrote:
> This allows passing different options for 5.5 than for the main version
> (which is currently 5.6).
> 
> * gnu/packages.qt.scm (python-pyqt-5.5, python2-pyqt-5.5)[arguments]: Copy
> from (python-pyqt)[arguments].
> ---
>  gnu/packages/qt.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> 

Currently the only package that relies on python-pyqt-5.5 and
python2-pyqt-5.5 is calibre. I would consider upgrading calibre and
seeing if it can be built with pyqt-5.6 or pyqt-5.7 and then just
removing python[2]-pyqt-5.5
Hartmut Goebel Dec. 9, 2016, 12:28 p.m. UTC | #3
Am 08.12.2016 um 22:19 schrieb Efraim Flashner:
> Currently the only package that relies on python-pyqt-5.5 and
> python2-pyqt-5.5 is calibre. I would consider upgrading calibre and
> seeing if it can be built with pyqt-5.6 or pyqt-5.7 and then just
> removing python[2]-pyqt-5.5

I updated calibre to the newest version 2.74 (will post the patch
later). It still requires Qt 5.5.
Efraim Flashner Dec. 9, 2016, 12:30 p.m. UTC | #4
On December 9, 2016 2:28:44 PM GMT+02:00, Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:
>Am 08.12.2016 um 22:19 schrieb Efraim Flashner:
>> Currently the only package that relies on python-pyqt-5.5 and
>> python2-pyqt-5.5 is calibre. I would consider upgrading calibre and
>> seeing if it can be built with pyqt-5.6 or pyqt-5.7 and then just
>> removing python[2]-pyqt-5.5
>
>I updated calibre to the newest version 2.74 (will post the patch
>later). It still requires Qt 5.5.

Are you sure? I built 2.63 with pyqt-5.6 on top of your patch and it built fine. I didn't try actually running it though
Hartmut Goebel Dec. 9, 2016, 12:54 p.m. UTC | #5
Am 09.12.2016 um 13:30 schrieb Efraim Flashner:
> Are you sure? I built 2.63 with pyqt-5.6 on top of your patch and it built fine. I didn't try actually running it though

It build fine, but it does not run :-( But on my system, 2.63 does not
run either.
diff mbox

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index fc4700e..aaa7e1c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -1054,6 +1054,36 @@  contain over 620 classes.")
          (base32
           "056qmkv02wdcfblqdaxiswrgn4wa88sz22i1x58dpb1iniavplfd"))
        (patches (search-patches "pyqt-configure.patch"))))
+    (arguments
+     `(#:modules ((srfi srfi-1)
+                  ,@%gnu-build-system-modules)
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (sip (string-append out "/share/sip"))
+                    (plugins (string-append out "/plugins"))
+                    (designer (string-append plugins "/designer"))
+                    (qml (string-append plugins "/PyQt5"))
+                    (python (assoc-ref inputs "python"))
+                    (python-version
+                      (last (string-split python #\-)))
+                    (python-major+minor
+                      (string-join
+                        (take (string-split python-version #\.) 2)
+                        "."))
+                    (lib (string-append out "/lib/python"
+                                        python-major+minor
+                                        "/site-packages")))
+               (zero? (system* "python" "configure.py"
+                               "--confirm-license"
+                               "--bindir" bin
+                               "--destdir" lib
+                               "--designer-plugindir" designer
+                               "--qml-plugindir" qml
+                               "--sipdir" sip))))))))
     (native-inputs
      `(("python-sip" ,python-sip)
        ("qt" ,qt)))))