From patchwork Fri Aug 26 14:50:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 41980 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3ACA627BBEA; Fri, 26 Aug 2022 16:17:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 687E527BBE9 for ; Fri, 26 Aug 2022 16:17:10 +0100 (BST) Received: from localhost ([::1]:34416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRb53-0002rB-Ge for patchwork@mira.cbaines.net; Fri, 26 Aug 2022 11:17:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRaig-0005k0-JW for guix-patches@gnu.org; Fri, 26 Aug 2022 10:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRaig-0002OJ-At for guix-patches@gnu.org; Fri, 26 Aug 2022 10:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRaig-0008Db-03 for guix-patches@gnu.org; Fri, 26 Aug 2022 10:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57431] [PATCH]: Add PyQt 6. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Aug 2022 14:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57431 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57431@debbugs.gnu.org X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.166152561831556 (code B ref -1); Fri, 26 Aug 2022 14:54:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Aug 2022 14:53:38 +0000 Received: from localhost ([127.0.0.1]:54322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRaiG-0008Cs-DS for submit@debbugs.gnu.org; Fri, 26 Aug 2022 10:53:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:34178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRaiD-0008Ch-Kq for submit@debbugs.gnu.org; Fri, 26 Aug 2022 10:53:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRaiB-0004q5-5E for guix-patches@gnu.org; Fri, 26 Aug 2022 10:53:33 -0400 Received: from mail-m971.mail.163.com ([123.126.97.1]:39964) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRai1-0002KV-Er for guix-patches@gnu.org; Fri, 26 Aug 2022 10:53:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=KFTYx 8BW/+m9wWLJK/STeiOwtHYzzHn62JETvjBzRVI=; b=Bxw4WpHPx8YVn3o5uY9nd kn1RJoMLzgGQ8VuDcWthpwSs2ELJYp+DD+Xzi/Qy6JeoxVS9UT2jThf/F6WzuKU9 Fh6TAAKcvmURNFawUcgr9GgOunKa+Rszd9e/N/J376ggPOZlPTRYqMSPLDhd1Xrj iSz0SvZooC63nRiHUpqD10= Received: from asus-laptop (unknown [163.125.249.44]) by smtp1 (Coremail) with SMTP id GdxpCgBHk59W3ghjCo0ZXg--.55398S2; Fri, 26 Aug 2022 22:53:11 +0800 (CST) User-agent: mu4e 1.8.9; emacs 29.0.50 From: Zhu Zihao Date: Fri, 26 Aug 2022 22:50:00 +0800 Message-ID: <865yifjbu2.fsf@163.com> MIME-Version: 1.0 X-CM-TRANSID: GdxpCgBHk59W3ghjCo0ZXg--.55398S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4RZMaeDUUUU X-Originating-IP: [163.125.249.44] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiTwVpr1sGce0+bAABse Received-SPF: pass client-ip=123.126.97.1; envelope-from=all_but_last@163.com; helo=mail-m971.mail.163.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From 0856c6efcd09be2a5326af457b01f994c954d959 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Fri, 26 Aug 2022 22:32:24 +0800 Subject: [PATCH 9/9] gnu: Add python-pyqtwebengine, version 6.3.1. * gnu/packages/qt.scm (python-pyqtwebengine): New variable. --- gnu/packages/qt.scm | 104 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index ac575c9828..821e824e36 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3162,6 +3162,110 @@ (define-public python-pyqt6-sip (synopsis "Sip module support for PyQt6") (description "Sip module support for PyQt6"))) +(define-public python-pyqtwebengine + (package + (name "python-pyqtwebengine") + (version "6.3.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "PyQt6_WebEngine" version)) + (sha256 + (base32 + "01zhx1yz8ggi6n9rwqi1z18aznbl3ndwa5yn090z85abgd9gblf3")))) + (build-system gnu-build-system) + (native-inputs + (list python + python-sip + python-pyqt-builder + ;; qtbase is required for qmake + qtbase)) + (inputs + (list python-pyqt + qtbase + qtdeclarative + qtwebchannel + qtwebengine)) + (arguments + (list + #:imported-modules `((guix build python-build-system) + ,@%gnu-build-system-modules) + #:modules + `((ice-9 regex) + ((guix build python-build-system) + #:select (site-packages python-version)) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-pyqt-sip-dirs + (lambda _ + (define sip-dir + (string-append + #$(this-package-input "python-pyqt") + "/lib/python" + (python-version #$(this-package-native-input "python")) + "/site-packages/PyQt6/bindings")) + + (substitute* "pyproject.toml" + (("tool\\.sip\\.project.+$" all) + (format #f "~asip-include-dirs = [\"~a\"]~%" + all sip-dir))))) + (replace 'configure + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (invoke "sip-build" + "--verbose" + "--no-make" + "--target-dir" (site-packages inputs outputs)))) + ;; XXX: qmake generates Makefile that tries to link with + ;; /lib/libQt6Qml.so. This phase deletes these + ;; bad references. + (add-after 'configure 'delete-bad-references + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("build/QtWebEngineCore/Makefile" + "build/QtWebEngineQuick/Makefile" + "build/QtWebEngineWidgets/Makefile") + (((string-append + (regexp-quote #$(this-package-input "qtbase")) + "/lib/libQt6(Qml|QmlModels|WebEngineCore)\\.so")) + "")))) + (add-after 'configure 'absolutize-qprinter.h + (lambda* (#:key inputs #:allow-other-keys) + (let* ((qtprinter.h + (string-append + "\"" + (search-input-file + inputs + "include/qt6/QtPrintSupport/qprinter.h") + "\""))) + (substitute* (find-files "build/QtWebEngineWidgets" + "\\.(cpp|h)$") + (("") + qtprinter.h)) + #t))) + (add-before 'build 'enter-build-directory + (lambda _ (chdir "build") #t)) + (add-after 'install 'leave-build-directory + (lambda _ (chdir "..") #t)) + (add-after 'install 'make-namespace + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((init (string-append + (site-packages inputs outputs) + "/PyQt6/__init__.py"))) + (with-output-to-file init + (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 QtWebEngine6") + (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.") + (license license:gpl3))) + (define-public python-pyqtwebengine-5 (package (name "python-pyqtwebengine") -- 2.37.2