aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/qt.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-01-21 21:34:41 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-01-21 21:34:41 +0100
commit715110a8a2e9e4b1a89635950744eb5260b8ee7f (patch)
tree0d0e4c41631092a068d8b0823f4d6b0a8d725eed /gnu/packages/qt.scm
parentb3c2ebda5bcedcfb88475e53b7f36c3a42cac8b4 (diff)
parent79e074ea10875ff75ca613179c70de12d64b19f5 (diff)
downloadpatches-715110a8a2e9e4b1a89635950744eb5260b8ee7f.tar
patches-715110a8a2e9e4b1a89635950744eb5260b8ee7f.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/qt.scm')
-rw-r--r--gnu/packages/qt.scm96
1 files changed, 95 insertions, 1 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 8dc771a5f8..80570c00dd 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -39,6 +39,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system python)
#:use-module (guix packages)
#:use-module (guix deprecation)
#:use-module (guix utils)
@@ -215,7 +216,7 @@ system, and the core design of Django is reused in Grantlee.")
("xcb-util-renderutil" ,xcb-util-renderutil)
("xcb-util-wm" ,xcb-util-wm)
("zlib" ,zlib)
- ("libjpeg" ,libjpeg-8)
+ ("libjpeg" ,libjpeg-turbo)
("libsm" ,libsm)
("openssl" ,openssl-1.0)))
(native-inputs
@@ -1958,6 +1959,17 @@ module provides support functions to the automatically generated code.")
,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
+ ;; When building python-pyqtwebengine, <qprinter.h> can not be
+ ;; included. Here we substitute the full path to the header in the
+ ;; store.
+ (add-before 'configure 'substitute-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((qtbase (assoc-ref inputs "qtbase"))
+ (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
+ (substitute* "sip/QtPrintSupport/qprinter.sip"
+ (("<qprinter.h>")
+ qtprinter.h))
+ #t)))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1997,6 +2009,88 @@ framework. The bindings are implemented as a set of Python modules and
contain over 620 classes.")
(license license:gpl3)))
+(define-public python-pyqtwebengine
+ (package
+ (name "python-pyqtwebengine")
+ (version "5.12.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/"
+ version "/PyQtWebEngine_gpl-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("python" ,python)
+ ("python-sip" ,python-sip)
+ ;; qtbase is required for qmake
+ ("qtbase" ,qtbase)))
+ (inputs
+ `(("python" ,python-wrapper)
+ ("python-sip" ,python-sip)
+ ("python-pyqt" ,python-pyqt)
+ ("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)
+ ("qtdeclarative" ,qtdeclarative)
+ ("qtwebchannel" ,qtwebchannel)
+ ("python-pyqt" ,python-pyqt)
+ ("qtwebengine" ,qtwebengine)))
+ (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"))
+ (sipdir (string-append out "/share/sip"))
+ (pyqt-sipdir (string-append
+ (assoc-ref inputs "python-pyqt") "/share/sip"))
+ (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/PyQt5"))
+ (stubs (string-append lib "/PyQt5")))
+
+ (mkdir-p sipdir)
+ (invoke "python" "configure.py"
+ "-w"
+ "--no-dist-info"
+ "--destdir" lib
+ "--no-qsci-api"
+ "--stubsdir" stubs
+ "--sipdir" sipdir
+ "--pyqt-sipdir" pyqt-sipdir))))
+ ;; Because this has a different prefix than python-pyqt then we need
+ ;; to make this a namespace of it's own
+ (add-after 'install 'make-namespace
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((__init__.py (string-append
+ (assoc-ref outputs "out")
+ "/lib/python3.7/site-packages/PyQt5/__init__.py")))
+ (with-output-to-file __init__.py
+ (lambda _ (display "
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
+")))
+ #t))))))
+ (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
+ (synopsis "Python bindings for QtWebEngine")
+ (description
+ "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
+WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
+set of three modules. Prior to v5.12 these bindings were part of PyQt
+itself.")
+ (license license:gpl3)))
+
;; XXX: This is useful because qtwebkit does not build reliably at this time.
;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
;; packages that could be used together.