diff mbox series

[bug#57431,v1,3/3] gnu: Add python-pyqtwebengine, version 6.6.0.

Message ID c7845be649cf23fb064ee7152623d7feaea90fdf.1700407095.git.herman@rimm.ee
State New
Headers show
Series [bug#57431,v1,1/3] gnu: Add python-pyqt6-sip. | expand

Commit Message

Herman Rimm Nov. 19, 2023, 3:18 p.m. UTC
From: Zhu Zihao <all_but_last@163.com>

* gnu/packages/qt.scm (python-pyqtwebengine-6): New variable.
---
 gnu/packages/qt.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

Comments

Ludovic Courtès Nov. 22, 2023, 3:49 p.m. UTC | #1
Herman Rimm <herman@rimm.ee> skribis:

> From: Zhu Zihao <all_but_last@163.com>
>
> * gnu/packages/qt.scm (python-pyqtwebengine-6): New variable.

[...]

> +    (inputs
> +     `(("python-pyqt" ,python-pyqt-6)
> +       ("qtbase" ,qtbase)
> +       ("qtdeclarative" ,qtdeclarative)
> +       ("qtwebchannel" ,qtwebchannel)
> +       ("qtwebengine" ,qtwebengine)))

[...]

> +                     (sip-include-dirs (string-append
> +                                        python-pyqt "/lib/python"
> +                                        (python-version python)
> +                                        "/site-packages/PyQt6/bindings")))

Similar comments as before regarding ‘guix style -S inputs’ and use of
‘search-input-directory’ above.

Could you send updated patches?

Thanks in advance!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index eea13d1ea2..3418900d16 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -3796,6 +3796,50 @@  (define-public python-pyqtwebengine
 itself.")
     (license license:gpl3)))
 
+(define-public python-pyqtwebengine-6
+  (package
+    (inherit python-pyqtwebengine)
+    (version "6.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "PyQt6_WebEngine" version))
+       (sha256
+        (base32
+         "11wlnggs5vi7z465xhmnz664wbaj44ki6mmijbk0kr457x69h2ym"))))
+    (native-inputs
+     (list python python-sip
+           python-pyqt-builder
+           ;; qtbase is required for qmake
+           qtbase))
+    (inputs
+     `(("python-pyqt" ,python-pyqt-6)
+       ("qtbase" ,qtbase)
+       ("qtdeclarative" ,qtdeclarative)
+       ("qtwebchannel" ,qtwebchannel)
+       ("qtwebengine" ,qtwebengine)))
+    (arguments
+     (list
+      #:tests? #f ; No tests.
+      #:configure-flags
+      #~`(@ ("--verbose" . "") ; Print commands run.
+            ("--jobs" . ,(number->string (parallel-job-count))))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-include-dirs
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((python (assoc-ref inputs "python"))
+                     (python-pyqt (assoc-ref inputs "python-pyqt"))
+                     (sip-include-dirs (string-append
+                                        python-pyqt "/lib/python"
+                                        (python-version python)
+                                        "/site-packages/PyQt6/bindings")))
+              (setenv "SIP_INCLUDE_DIRS" sip-include-dirs)))))))
+    (description
+     "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
+WebEngine libraries.  The bindings sit on top of PyQt6 and are implemented as a
+set of three modules.")))
+
 (define-public python-pyqt-builder
   (package
    (name "python-pyqt-builder")