From: Mike Rosset <mike.rosset@gmail.com>
To: 38148@debbugs.gnu.org
Cc: mike.rosset@gmail.com
Subject: bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine.
Date: Mon, 13 Jan 2020 02:33:03 -0800 [thread overview]
Message-ID: <20200113103304.9093-1-mike.rosset@gmail.com> (raw)
In-Reply-To: <20191109100530.zdfrewfmengq7pud@hooch.localdomain>
* gnu/packages/qt.scm (python-pyqtwebengine): New variable.
---
gnu/packages/qt.scm | 97 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 514577678e..fcb297e99c 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -38,6 +38,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)
@@ -1947,6 +1948,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"))
@@ -1986,6 +1998,91 @@ 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)
+ ("qtwebengine" ,qtwebengine)
+ ("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")))
+
+ (system* "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 then 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.
--
2.24.1
next prev parent reply other threads:[~2020-01-13 10:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-09 10:05 bug#38148: Guix packages old/broken version of qutebrowser Florian Bruhin
2019-11-09 16:49 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2019-11-10 2:32 ` Bengt Richter
2020-01-13 10:33 ` Mike Rosset [this message]
2020-01-13 10:33 ` bug#38148: [PATCH 2/2] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
2020-01-13 14:20 ` Pierre Neidhardt
2020-01-13 18:54 ` Mike Rosset
2020-01-13 19:02 ` Pierre Neidhardt
2020-01-13 10:45 ` bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine Mike Rosset
2020-01-13 14:16 ` Pierre Neidhardt
2020-01-14 0:42 ` Mike Rosset
2020-01-14 9:42 ` Pierre Neidhardt
2020-01-14 10:25 ` Mike Rosset
2020-01-14 11:09 ` Mike Rosset
2020-01-15 15:31 ` Pierre Neidhardt
2020-01-15 17:26 ` Mike Rosset
2020-01-14 0:13 ` bug#38148: [PATCH 3/4] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
2020-01-14 0:13 ` bug#38148: [PATCH 4/4] gnu: qutebrowser: Improve comment sections Mike Rosset
2020-01-14 11:04 ` bug#38148: [PATCH 1/5] gnu: python-pyqt: Substitute the full path of <qprinter.h> Mike Rosset
2020-01-14 11:06 ` bug#38148: [PATCH 2/5] gnu: Add python-pyqtwebengine Mike Rosset
2020-01-14 11:06 ` bug#38148: [PATCH 3/5] gnu: qutebrowser: Update to 1.9.0 Mike Rosset
2020-01-14 11:06 ` bug#38148: [PATCH 4/5] gnu: python-pyqt: Improved qprinter.h substitutition comment Mike Rosset
2020-01-14 11:06 ` bug#38148: [PATCH 5/5] gnu: qutebrowser: Improve comment sections Mike Rosset
2020-01-15 20:55 ` bug#38148: Guix packages old/broken version of qutebrowser Ricardo Wurmus
2020-01-16 12:04 ` Florian Bruhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200113103304.9093-1-mike.rosset@gmail.com \
--to=mike.rosset@gmail.com \
--cc=38148@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).