guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: Add python-pyqt.


From: Andreas Enge
Subject: 01/01: gnu: Add python-pyqt.
Date: Sun, 25 Jan 2015 19:10:25 +0000

andreas pushed a commit to branch master
in repository guix.

commit 014e7dd8f0d5add1a1aa234399c499099a2b2885
Author: Andreas Enge <address@hidden>
Date:   Sun Jan 25 20:07:08 2015 +0100

    gnu: Add python-pyqt.
    
    * gnu/packages/qt.scm (python-pyqt, python2-pyqt): New variables.
    * gnu/packages/patches/pyqt-configure.patch: New file.
    * gnu-system.am (dist_patch_DATA): Register patch.
---
 gnu-system.am                             |    1 +
 gnu/packages/patches/pyqt-configure.patch |   15 +++++++
 gnu/packages/qt.scm                       |   64 +++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 61829ad..c4387ba 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -462,6 +462,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/pulseaudio-fix-mult-test.patch          \
   gnu/packages/patches/pybugz-encode-error.patch               \
   gnu/packages/patches/pybugz-stty.patch                       \
+  gnu/packages/patches/pyqt-configure.patch                    \
   gnu/packages/patches/python-fix-tests.patch                  \
   gnu/packages/patches/python-libffi-mips-n32-fix.patch                \
   gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch      \
diff --git a/gnu/packages/patches/pyqt-configure.patch 
b/gnu/packages/patches/pyqt-configure.patch
new file mode 100644
index 0000000..b922f10
--- /dev/null
+++ b/gnu/packages/patches/pyqt-configure.patch
@@ -0,0 +1,15 @@
+Have configure.py modify internal variables depending on the --qml-plugindir
+configure option.
+diff -u PyQt-gpl-5.4.alt/configure.py PyQt-gpl-5.4/configure.py
+--- PyQt-gpl-5.4.alt/configure.py      2015-01-25 17:27:50.000000000 +0100
++++ PyQt-gpl-5.4/configure.py  2015-01-25 17:56:41.000000000 +0100
+@@ -904,6 +904,9 @@
+         if opts.pyuicinterpreter is not None:
+             self.pyuic_interpreter = opts.pyuicinterpreter
+ 
++        if opts.qmlplugindir is not None:
++            self.qml_plugin_dir = opts.qmlplugindir
++
+         if opts.qsciapidir is not None:
+             self.qsci_api_dir = opts.qsciapidir
+ 
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index ff27ae9..cb7e367 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -334,3 +334,67 @@ module provides support functions to the automatically 
generated code.")
     (name "python2-sip")
     (native-inputs
      `(("python" ,python-2)))))
+
+(define-public python-pyqt
+  (package
+    (name "python-pyqt")
+    (version "5.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri
+          (string-append "mirror://sourceforge/pyqt/PyQt5/"
+                         "PyQt-" version "/PyQt-gpl-"
+                         version ".tar.gz"))
+        (sha256
+         (base32
+          "0cbpa63whi8a5akff4pcnfwzpzx7ycac2ynj00ly52m6zbsn80kn"))
+       (patches (list (search-patch "pyqt-configure.patch")))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python-sip" ,python-sip)
+       ("qt" ,qt))) ; for qmake
+    (inputs
+     `(("python" ,python-wrapper)))
+    (arguments
+     `(#:phases
+         (alist-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-version
+                    (string-take
+                      (string-take-right (assoc-ref inputs "python") 5)
+                      3))
+                  (lib (string-append out "/lib/python"
+                                      python-version
+                                      "/site-packages")))
+             (zero? (system* "python" "configure.py"
+                             "--confirm-license"
+                             "--bindir" bin
+                             "--destdir" lib
+                             "--designer-plugindir" designer
+                             "--qml-plugindir" qml
+                             "--sipdir" sip))))
+         %standard-phases)))
+    (home-page "http://www.riverbankcomputing.com/software/pyqt/intro";)
+    (synopsis "Python bindings for Qt")
+    (description
+     "PyQt is a set of Python v2 and v3 bindings for the Qt application
+framework.  The bindings are implemented as a set of Python modules and
+contain over 620 classes.")
+    (license gpl3)))
+
+(define-public python2-pyqt
+  (package (inherit python-pyqt)
+    (name "python2-pyqt")
+    (native-inputs
+     `(("python-sip" ,python2-sip)
+       ("qt" ,qt)))
+    (inputs
+     `(("python" ,python-2)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]