aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2015-01-25 20:07:08 +0100
committerAndreas Enge <andreas@enge.fr>2015-01-25 20:10:03 +0100
commit014e7dd8f0d5add1a1aa234399c499099a2b2885 (patch)
tree7c689c77298c743a4129f7c46fc232a68ce95b44
parent84ef83dd05b829264c924d37782f7d74bec43718 (diff)
downloadguix-014e7dd8f0d5add1a1aa234399c499099a2b2885.tar
guix-014e7dd8f0d5add1a1aa234399c499099a2b2885.tar.gz
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.
-rw-r--r--gnu-system.am1
-rw-r--r--gnu/packages/patches/pyqt-configure.patch15
-rw-r--r--gnu/packages/qt.scm64
3 files changed, 80 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am
index 61829ad098..c4387baec8 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 0000000000..b922f108d8
--- /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 ff27ae92ce..cb7e367c5a 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)))))