GNU bug report logs - #57431
[PATCH]: Add PyQt 6.

Previous Next

Package: guix-patches;

Reported by: Zhu Zihao <all_but_last <at> 163.com>

Date: Fri, 26 Aug 2022 14:54:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Herman Rimm <herman <at> rimm.ee>
To: 57431 <at> debbugs.gnu.org
Cc: Zhu Zihao <all_but_last <at> 163.com>, Andreas Enge <andreas <at> enge.fr>, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 宋文武 <iyzsong <at> envs.net>
Subject: [bug#57431] [PATCH v3 2/3] gnu: Add python-pyqt, version 6.5.2.
Date: Thu, 23 Nov 2023 12:59:18 +0100
From: Zhu Zihao <all_but_last <at> 163.com>

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

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index c703dbf4cc..1b8c56ef28 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2022 Yash Tiwari <yasht <at> mailbox.org>
 ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2022 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 Herman Rimm <herman <at> rimm.ee>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3656,6 +3657,50 @@ (define-public python-pyqt
 contain over 620 classes.")
     (license license:gpl3)))
 
+(define-public python-pyqt-6
+  (package
+    (inherit python-pyqt)
+    (version "6.5.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "PyQt6" version))
+       (file-name (string-append "PyQt6-" version ".tar.gz"))
+       (sha256
+        (base32 "100jh1iiz5gx821qzgicfrqv7hjjj98pchdbc1nvdzzra1ryx1ql"))))
+    (inputs ;Qt5 dependencies only in python-pyqt:
+            ;; (qt)connectivity, location, sensors, serialport, x11extras, xmlpatterns.
+            (list python-wrapper
+                  qtbase
+                  qtdeclarative
+                  qtmultimedia
+                  qtpositioning
+                  qtsvg
+                  qttools
+                  qtwebchannel
+                  qtwebsockets))
+    (propagated-inputs (list python-sip python-pyqt6-sip))
+    (native-inputs (list python-pyqt-builder qtbase)) ;qtbase is required for qmake.
+    (arguments
+     (list
+      #:tests? #f ;No tests.
+      #:configure-flags #~`(@ ("--verbose" . "") ;Print commands run.
+                              ("--confirm-license" . "")
+                              ("--jobs" unquote
+                               (number->string (parallel-job-count))))
+      #:phases #~(modify-phases %standard-phases
+                   ;; When building python-pyqtwebengine, <qprinter.h> cannot be
+                   ;; included.  Here we substitute the full path to the header in the
+                   ;; store.
+                   (add-after 'unpack 'substitute-source
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (let* ((qprinter.h (search-input-file inputs
+                                           "/include/qt6/QtPrintSupport/qprinter.h")))
+                         (substitute* (list "sip/QtPrintSupport/qprinter.sip"
+                                       "sip/QtPrintSupport/qpyprintsupport_qlist.sip")
+                           (("qprinter.h")
+                            qprinter.h))))))))))
+
 (define-public python-pyqt5-sip
   (package
     (name "python-pyqt5-sip")
-- 
2.41.0





This bug report was last modified 1 year and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.