From unknown Sat Aug 16 20:59:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#57398 <57398@debbugs.gnu.org> To: bug#57398 <57398@debbugs.gnu.org> Subject: Status: [PATCH]: Add PySide 6. Reply-To: bug#57398 <57398@debbugs.gnu.org> Date: Sun, 17 Aug 2025 03:59:02 +0000 retitle 57398 [PATCH]: Add PySide 6. reassign 57398 guix-patches submitter 57398 Zhu Zihao severity 57398 normal tag 57398 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 01:41:55 2022 Received: (at submit) by debbugs.gnu.org; 25 Aug 2022 05:41:55 +0000 Received: from localhost ([127.0.0.1]:48607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR5co-0005i7-1B for submit@debbugs.gnu.org; Thu, 25 Aug 2022 01:41:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:56990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR5ci-0005hu-3o for submit@debbugs.gnu.org; Thu, 25 Aug 2022 01:41:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR5ch-0003nC-PX for guix-patches@gnu.org; Thu, 25 Aug 2022 01:41:47 -0400 Received: from mail-m971.mail.163.com ([123.126.97.1]:59183) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR5cY-0000GQ-K0 for guix-patches@gnu.org; Thu, 25 Aug 2022 01:41:44 -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=OIbqN lUdiYCKu+v4tP44nF7oSBNLx1TxjCRD4NLfQ1M=; b=nXPVtG2bOxRp1vEd6fFXB 0yUolLm655WbzODDEUZt4e4GFbekC3iFvLVedll12kcHpco/Ktf0Rg/TQQCkNu/V yKDHZXcXWCxcocGqLRAavEF0fThrU22kayHJlrZJtDxalxORp5db6JB/xyWa/hjH 2Ey0QxIS6QSCTtUifATSC0= Received: from asus-laptop (unknown [163.125.249.44]) by smtp1 (Coremail) with SMTP id GdxpCgCX6LmECwdjf4i9XA--.25871S2; Thu, 25 Aug 2022 13:41:25 +0800 (CST) User-agent: mu4e 1.8.9; emacs 29.0.50 From: Zhu Zihao To: guix-patches Subject: [PATCH]: Add PySide 6. Date: Thu, 25 Aug 2022 13:38:07 +0800 Message-ID: <86czcoribi.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: GdxpCgCX6LmECwdjf4i9XA--.25871S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvj4RZMaeDUUUU X-Originating-IP: [163.125.249.44] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBPQZor2AZCBazxgAAsu 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-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From bbfc717a19c272d1f2698bca44e72109cbe1d3cf Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 16:50:14 +0800 Subject: [PATCH 1/9] gnu: python-shiboken-2: Use G-expressions. * gnu/packages/qt.scm (python-shiboken-2)[arguments]: Use G-expressions. <#:phases>: In phase "set-build-env", Replace (assoc-ref inputs ...) with (this-package-input ...). --- gnu/packages/qt.scm | 5 [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (all_but_last[at]163.com) 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.5 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-python-shiboken-2-Use-G-expressions.patch Content-Transfer-Encoding: quoted-printable >From bbfc717a19c272d1f2698bca44e72109cbe1d3cf Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 16:50:14 +0800 Subject: [PATCH 1/9] gnu: python-shiboken-2: Use G-expressions. * gnu/packages/qt.scm (python-shiboken-2)[arguments]: Use G-expressions. <#:phases>: In phase "set-build-env", Replace (assoc-ref inputs ...) with (this-package-input ...). --- gnu/packages/qt.scm | 53 +++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index d9d796f551..fe9c9213e5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -24,6 +24,7 @@ ;;; Copyright =C2=A9 2021, 2022 Guillaume Le Vaillant ;;; Copyright =C2=A9 2021 Nicol=C3=B2 Balzarotti ;;; Copyright =C2=A9 2022 Foo Chuan Wei +;;; Copyright =C2=A9 2022 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -3746,6 +3747,9 @@ (define-public qcustomplot "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts= .") (license license:gpl3+))) =20 +;; TODO: Split shiboken2 binding generator into a dedicated output. +;; This executable requires libxml2, libxslt, clang-toolchain at runtime. +;; The libshiboken library only requires Qt and Python at runtime. (define-public python-shiboken-2 (package (name "python-shiboken-2") @@ -3768,30 +3772,31 @@ (define-public python-shiboken-2 qtbase-5 qtxmlpatterns)) (arguments - `(#:tests? #f - ;; FIXME: Building tests fails - #:configure-flags '("-DBUILD_TESTS=3Doff") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'use-shiboken-dir-only - (lambda _ (chdir "sources/shiboken2") #t)) - (add-before 'configure 'make-files-writable-and-update-timestamps - (lambda _ - ;; The build scripts need to modify some files in - ;; the read-only source directory, and also attempts - ;; to create Zip files which fails because the Zip - ;; format does not support timestamps before 1980. - (let ((circa-1980 (* 10 366 24 60 60))) - (for-each (lambda (file) - (make-file-writable file) - (utime file circa-1980 circa-1980)) - (find-files "."))) - #t)) - (add-before 'configure 'set-build-env - (lambda* (#:key inputs #:allow-other-keys) - (let ((llvm (assoc-ref inputs "clang-toolchain"))) - (setenv "CLANG_INSTALL_DIR" llvm) - #t)))))) + (list + #:tests? #f + ;; FIXME: Building tests fails + #:configure-flags #~(list "-DBUILD_TESTS=3Doff") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'use-shiboken-dir-only + (lambda _ (chdir "sources/shiboken2") #t)) + (add-before 'configure 'make-files-writable-and-update-timestamps + (lambda _ + ;; The build scripts need to modify some files in + ;; the read-only source directory, and also attempts + ;; to create Zip files which fails because the Zip + ;; format does not support timestamps before 1980. + (let ((circa-1980 (* 10 366 24 60 60))) + (for-each (lambda (file) + (make-file-writable file) + (utime file circa-1980 circa-1980)) + (find-files "."))) + #t)) + (add-before 'configure 'set-build-env + (lambda _ + (let ((llvm #$(this-package-input "clang-toolchain"))) + (setenv "CLANG_INSTALL_DIR" llvm) + #t)))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "Shiboken generates bindings for C++ libraries using CPython source c= ode") --=20 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-python-shiboken-6.patch >From 1f1e9b864581544be3fb2e5281a5182826538807 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 19:23:31 +0800 Subject: [PATCH 2/9] gnu: Add python-shiboken-6 * gnu/packages/qt.scm (python-shiboken-6): New variable. --- gnu/packages/qt.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index fe9c9213e5..7e303a929c 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3810,6 +3810,40 @@ (define-public python-shiboken-2 license:lgpl3 license:bsd-3)))) +(define-public python-shiboken-6 + (package + (inherit python-shiboken-2) + (name "python-shiboken-6") + (version "6.3.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases" + "/QtForPython/pyside6/PySide6-" version + "-src/pyside-setup-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0xwri69nnbhn6fajm7l045r0s0qv8nlq6qj8wcj87srli3b5xa75")))) + (build-system cmake-build-system) + (inputs + (modify-inputs (package-inputs python-shiboken-2) + (replace "qtbase" qtbase) + (delete "qtxmlpatterns"))) + (arguments + (substitute-keyword-arguments (package-arguments python-shiboken-2) + ((#:phases p) + #~(modify-phases #$p + (replace 'use-shiboken-dir-only + (lambda _ (chdir "sources/shiboken6") #t)))) + ((#:configure-flags flags) + #~(cons* + ;; The RUNPATH of shibokenmodule contains the entry in build + ;; directory instead of install directory. + "-DCMAKE_SKIP_RPATH=TRUE" + (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath=" + #$output "/lib") + #$flags)))))) + (define-public python-pyside-2 (package (name "python-pyside-2") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-gnu-python-pyside-2-Use-G-expressions.patch >From a4d31ffc721fa3b459e2f168cb4af65147b82248 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 19:25:26 +0800 Subject: [PATCH 3/9] gnu: python-pyside-2: Use G-expressions. * gnu/packages/qt.scm (python-pyside-2)[native-inputs]: Use label-less input style. [arguments]: Use G-expressions. --- gnu/packages/qt.scm | 116 ++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 59 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 7e303a929c..3f53f22363 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3874,68 +3874,66 @@ (define-public python-pyside-2 (propagated-inputs (list python-shiboken-2)) (native-inputs - `(("cmake" ,cmake-minimal) - ("python" ,python-wrapper) - ("qttools-5" ,qttools-5) - ("which" ,which))) + (list cmake-minimal python-wrapper qttools-5 which)) (arguments - `(#:tests? #f - ;; FIXME: Building tests fail. - #:configure-flags - (list "-DBUILD_TESTS=FALSE" - (string-append "-DPYTHON_EXECUTABLE=" - (assoc-ref %build-inputs "python") - "/bin/python")) - #:modules ((guix build cmake-build-system) + (list + #:tests? #f + ;; FIXME: Building tests fail. + #:configure-flags + #~(list "-DBUILD_TESTS=FALSE" + (string-append "-DPYTHON_EXECUTABLE=" + (assoc-ref %build-inputs "python") + "/bin/python")) + #:modules '((guix build cmake-build-system) (guix build utils) (srfi srfi-1)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'go-to-source-dir - (lambda _ (chdir "sources/pyside2") #t)) - (add-after 'go-to-source-dir 'fix-qt-module-detection - (lambda* (#:key inputs #:allow-other-keys) - ;; Activate qt module support even if it not in the same - ;; directory as qtbase. - (substitute* "../cmake_helpers/helpers.cmake" - (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") - "true")) - ;; Add include directories for qt modules. - (let ((dirs (map (lambda (name) - (string-append (assoc-ref inputs name) - "/include/qt5")) - '("qtdatavis3d" - "qtdeclarative" - "qtlocation" - "qtmultimedia" - "qtquickcontrols" - "qtquickcontrols2" - "qtscript" - "qtscxml" - "qtsensors" - "qtspeech" - "qtsvg" - "qttools-5" - "qtwebchannel" - "qtwebengine" - "qtwebsockets" - "qtx11extras" - "qtxmlpatterns")))) - (substitute* "cmake/Macros/PySideModules.cmake" - (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all) - (fold (lambda (dir paths) - (string-append paths "${PATH_SEP}" dir)) - all - dirs))) - (setenv "CXXFLAGS" (fold (lambda (dir paths) - (string-append paths " -I" dir)) - "" - dirs))))) - (add-before 'configure 'set-clang-dir - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "clang-toolchain"))) - (setenv "CLANG_INSTALL_DIR" clang) - #t)))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'go-to-source-dir + (lambda _ (chdir "sources/pyside2") #t)) + (add-after 'go-to-source-dir 'fix-qt-module-detection + (lambda* (#:key inputs #:allow-other-keys) + ;; Activate qt module support even if it not in the same + ;; directory as qtbase. + (substitute* "../cmake_helpers/helpers.cmake" + (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") + "true")) + ;; Add include directories for qt modules. + (let ((dirs (map (lambda (name) + (string-append (assoc-ref inputs name) + "/include/qt5")) + '("qtdatavis3d" + "qtdeclarative" + "qtlocation" + "qtmultimedia" + "qtquickcontrols" + "qtquickcontrols2" + "qtscript" + "qtscxml" + "qtsensors" + "qtspeech" + "qtsvg" + "qttools-5" + "qtwebchannel" + "qtwebengine" + "qtwebsockets" + "qtx11extras" + "qtxmlpatterns")))) + (substitute* "cmake/Macros/PySideModules.cmake" + (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all) + (fold (lambda (dir paths) + (string-append paths "${PATH_SEP}" dir)) + all + dirs))) + (setenv "CXXFLAGS" (fold (lambda (dir paths) + (string-append paths " -I" dir)) + "" + dirs))))) + (add-before 'configure 'set-clang-dir + (lambda* (#:key inputs #:allow-other-keys) + (let ((clang (assoc-ref inputs "clang-toolchain"))) + (setenv "CLANG_INSTALL_DIR" clang) + #t)))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "The Qt for Python product enables the use of Qt5 APIs in Python applications") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0004-gnu-python-pyside-2-Clarify-the-package-inputs.patch >From 3d1db3ee35d31414e2d4ef40ad5fcffa60a1e7b4 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 22:54:46 +0800 Subject: [PATCH 4/9] gnu: python-pyside-2: Clarify the package inputs. The module "PySide.PyQtUiTools" depends on "qttools-5", it should be an input, not a native input. libxml2, libxslt, clang-toolchain is only used by python-shiboken-2. cmake-minimal is not used. * gnu/packages/qt.scm (python-pyside-2): [inputs]: Remove libxml2, libxslt, clang-toolchain. Add qttools-5. [native-inputs]: Remove cmake-minimal, qttools-5. [arguments]<#:phases>: Remove phase "set-clang-dir". --- gnu/packages/qt.scm | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 3f53f22363..dd1e2d4640 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3851,10 +3851,7 @@ (define-public python-pyside-2 (source (package-source python-shiboken-2)) (build-system cmake-build-system) (inputs - (list libxml2 - libxslt - clang-toolchain - qtbase-5 + (list qtbase-5 qtdatavis3d qtdeclarative-5 qtlocation @@ -3866,6 +3863,7 @@ (define-public python-pyside-2 qtsensors qtspeech qtsvg-5 + qttools-5 qtwebchannel-5 qtwebengine-5 qtwebsockets-5 @@ -3874,7 +3872,7 @@ (define-public python-pyside-2 (propagated-inputs (list python-shiboken-2)) (native-inputs - (list cmake-minimal python-wrapper qttools-5 which)) + (list python-wrapper)) (arguments (list #:tests? #f @@ -3928,12 +3926,7 @@ (define-public python-pyside-2 (setenv "CXXFLAGS" (fold (lambda (dir paths) (string-append paths " -I" dir)) "" - dirs))))) - (add-before 'configure 'set-clang-dir - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "clang-toolchain"))) - (setenv "CLANG_INSTALL_DIR" clang) - #t)))))) + dirs)))))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "The Qt for Python product enables the use of Qt5 APIs in Python applications") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0005-gnu-python-pyside-2-Use-this-package-input-instead-o.patch >From 801e4315b1ef24fc18cf61169b42443eb221e924 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 22:57:44 +0800 Subject: [PATCH 5/9] gnu: python-pyside-2: Use "this-package-input" instead of "assoc-ref". * gnu/packages/qt.scm (python-pyside-2)[arguments]<#:configure-flags>: Use "this-package-input" <#:phases>: In phase "fix-qt-module-detection", use "this-package-input". --- gnu/packages/qt.scm | 46 +++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index dd1e2d4640..bc16f69e60 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3880,7 +3880,7 @@ (define-public python-pyside-2 #:configure-flags #~(list "-DBUILD_TESTS=FALSE" (string-append "-DPYTHON_EXECUTABLE=" - (assoc-ref %build-inputs "python") + #$(this-package-native-input "python-wrapper") "/bin/python")) #:modules '((guix build cmake-build-system) (guix build utils) @@ -3890,33 +3890,35 @@ (define-public python-pyside-2 (add-after 'unpack 'go-to-source-dir (lambda _ (chdir "sources/pyside2") #t)) (add-after 'go-to-source-dir 'fix-qt-module-detection - (lambda* (#:key inputs #:allow-other-keys) + (lambda _ ;; Activate qt module support even if it not in the same ;; directory as qtbase. (substitute* "../cmake_helpers/helpers.cmake" (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") "true")) ;; Add include directories for qt modules. - (let ((dirs (map (lambda (name) - (string-append (assoc-ref inputs name) - "/include/qt5")) - '("qtdatavis3d" - "qtdeclarative" - "qtlocation" - "qtmultimedia" - "qtquickcontrols" - "qtquickcontrols2" - "qtscript" - "qtscxml" - "qtsensors" - "qtspeech" - "qtsvg" - "qttools-5" - "qtwebchannel" - "qtwebengine" - "qtwebsockets" - "qtx11extras" - "qtxmlpatterns")))) + (let ((dirs (map (lambda (path) + (string-append path "/include/qt5")) + (list + #$@(map (lambda (name) + (this-package-input name)) + '("qtdatavis3d" + "qtdeclarative" + "qtlocation" + "qtmultimedia" + "qtquickcontrols" + "qtquickcontrols2" + "qtscript" + "qtscxml" + "qtsensors" + "qtspeech" + "qtsvg" + "qttools" + "qtwebchannel" + "qtwebengine" + "qtwebsockets" + "qtx11extras" + "qtxmlpatterns")))))) (substitute* "cmake/Macros/PySideModules.cmake" (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all) (fold (lambda (dir paths) -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0006-gnu-Add-python-pyside-6.patch >From 1b1d4b2a22638aca688a9f35572b82c9dc649d1f Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 12:42:54 +0800 Subject: [PATCH 6/9] gnu: Add python-pyside-6. * gnu/packages/qt.scm (python-pyside-6): New variable. --- gnu/packages/qt.scm | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index bc16f69e60..0d1d6124d4 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3950,6 +3950,78 @@ (define-public python-pyside-2 license:gpl3 license:gpl2)))) +(define-public python-pyside-6 + (package + (inherit python-pyside-2) + (name "python-pyside-6") + (version (package-version python-shiboken-6)) + (source (package-source python-shiboken-6)) + ;; TODO: Add more Qt components if available. + (inputs + (list qtbase + qtdeclarative + qtmultimedia + qtnetworkauth + qtpositioning + qtsvg + qttools + qtwebchannel + qtwebengine + qtwebsockets)) + (propagated-inputs + (list python-shiboken-6)) + (native-inputs + (list python-wrapper)) + (arguments + (list + #:tests? #f + #:configure-flags + #~(list "-DBUILD_TESTS=FALSE" + (string-append "-DPYTHON_EXECUTABLE=" + #$(this-package-native-input "python-wrapper") + "/bin/python")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'go-to-source-dir + (lambda _ (chdir "sources/pyside6") #t)) + (add-after 'go-to-source-dir 'fix-qt-module-detection + (lambda _ + (substitute* "cmake/PySideHelpers.cmake" + (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") + "true")) + (let ((dirs (map (lambda (path) + (string-append path "/include/qt6")) + (list + #$@(map (lambda (name) + (this-package-input name)) + '("qtdeclarative" + "qtmultimedia" + "qtnetworkauth" + "qtpositioning" + "qtsvg" + "qttools" + "qtwebchannel" + "qtwebengine" + "qtwebsockets")))))) + (substitute* "cmake/Macros/PySideModules.cmake" + (("set\\(shiboken_include_dir_list " all) + (string-append all (string-join dirs ";") " "))) + (setenv "CXXFLAGS" + (string-join + (map (lambda (dir) + (string-append "-I" dir)) + dirs) + " ")))))))) + (synopsis + "The Qt for Python product enables the use of Qt6 APIs in Python applications") + (description + "The Qt for Python product enables the use of Qt6 APIs in Python +applications. It lets Python developers utilize the full potential of Qt, +using the PySide6 module. The PySide6 module provides access to the +individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also +comes with the Shiboken6 CPython binding code generator, which can be used to +generate Python bindings for your C or C++ code."))) + (define-public python-pyside-2-tools (package (name "python-pyside-2-tools") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0007-gnu-python-pyside-2-tools-Use-G-expressions.patch >From f3fffdcfd6635399418073e4bb6bf884a685d5d7 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 13:02:46 +0800 Subject: [PATCH 7/9] gnu: python-pyside-2-tools: Use G-expressions. * gnu/packages/qt.scm (python-pyside2-tools)[native-inputs]: Use label-less style. [arguments]: Use G-expressions. <#:configure-flags>: Use "this-package-native-input". --- gnu/packages/qt.scm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 0d1d6124d4..e1bda580ad 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4031,17 +4031,19 @@ (define-public python-pyside-2-tools (inputs (list python-pyside-2 python-shiboken-2 qtbase-5)) (native-inputs - `(("python" ,python-wrapper))) + (list python-wrapper)) (arguments - `(#:tests? #f - #:configure-flags - (list "-DBUILD_TESTS=off" - (string-append "-DPYTHON_EXECUTABLE=" - (assoc-ref %build-inputs "python") - "/bin/python")) - #:phases (modify-phases %standard-phases - (add-after 'unpack 'go-to-source-dir - (lambda _ (chdir "sources/pyside2-tools") #t))))) + (list + #:tests? #f + #:configure-flags + #~(list "-DBUILD_TESTS=off" + (string-append "-DPYTHON_EXECUTABLE=" + #$(this-package-native-inputs "python-wrapper") + "/bin/python")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'go-to-source-dir + (lambda _ (chdir "sources/pyside2-tools") #t))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "Contains command line tools for PySide2") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0008-gnu-python-pyside-2-tools-Fix-synopsis-and-descripti.patch >From 2669f1f0dd7a2688f0dcaf913649a24640a68f7c Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 13:04:45 +0800 Subject: [PATCH 8/9] gnu: python-pyside-2-tools: Fix synopsis and description. * gnu/packages/qt.scm (python-pyside2-tools)[synopsis]: Use more descriptive words. [description]: Ditto. --- gnu/packages/qt.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index e1bda580ad..84550872b1 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4046,9 +4046,9 @@ (define-public python-pyside-2-tools (lambda _ (chdir "sources/pyside2-tools") #t))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis - "Contains command line tools for PySide2") + "Command line tools for PySide2") (description - "Contains lupdate, rcc and uic tools for PySide2") + "Python-pyside-2-tools contains lupdate, rcc and uic tools for PySide2") (license license:gpl2))) (define-public libqglviewer -- 2.37.2 --=-=-= Content-Type: text/plain -- Retrieve my PGP public key: gpg --recv-keys 481F5EEEBA425ADC13247C76A6E672D981B8E744 Zihao --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 06:32:26 2022 Received: (at 57398) by debbugs.gnu.org; 25 Aug 2022 10:32:26 +0000 Received: from localhost ([127.0.0.1]:49088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRA9x-0007Se-Or for submit@debbugs.gnu.org; Thu, 25 Aug 2022 06:32:26 -0400 Received: from mail-m971.mail.163.com ([123.126.97.1]:18853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRA9t-0007SK-Fa for 57398@debbugs.gnu.org; Thu, 25 Aug 2022 06:32:24 -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=WigeJ FlOpV88ByGnKIbBtCT7JTxgfx/oDOR2v5vleqQ=; b=R4Dp8mgNA7taKYkxXCOjw uAu4k2mezSOHbpIi3edXM7GCH9eXNj0s/RhrjPC0Rxx+0xfzRye8h9oKOP3hjjdG fgDyBh/GhBqODR2Y5m+Ky39xlHqRW2xwev2815HCxurtUNR1G+OesE3rx0OJa7MH gBaPjtwfjEKfIehec25z5c= Received: from asus-laptop (unknown [163.125.249.44]) by smtp1 (Coremail) with SMTP id GdxpCgDHAZ2mTwdjZSLuXA--.14164S2; Thu, 25 Aug 2022 18:32:11 +0800 (CST) References: <86czcoribi.fsf@163.com> User-agent: mu4e 1.8.9; emacs 29.0.50 From: Zhu Zihao To: 57398@debbugs.gnu.org Subject: Re: bug#57398: Acknowledgement ([PATCH]: Add PySide 6.) Date: Thu, 25 Aug 2022 18:30:56 +0800 In-reply-to: Message-ID: <8635dkr4v8.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: GdxpCgDHAZ2mTwdjZSLuXA--.14164S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRVpBVDUUUU X-Originating-IP: [163.125.249.44] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBLwlor2HmoJOE3QABsN X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Patches updated From bbfc717a19c272d1f2698bca44e72109cbe1d3cf Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 16:50:14 +0800 Subject: [PATCH 1/9] gnu: python-shiboken-2: Use G-expressions. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [123.126.97.1 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: nixo.xyz (xyz)] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (all_but_last[at]163.com) -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 57398 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain Patches updated --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-python-shiboken-2-Use-G-expressions.patch Content-Transfer-Encoding: quoted-printable >From bbfc717a19c272d1f2698bca44e72109cbe1d3cf Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 16:50:14 +0800 Subject: [PATCH 1/9] gnu: python-shiboken-2: Use G-expressions. * gnu/packages/qt.scm (python-shiboken-2)[arguments]: Use G-expressions. <#:phases>: In phase "set-build-env", Replace (assoc-ref inputs ...) with (this-package-input ...). --- gnu/packages/qt.scm | 53 +++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index d9d796f551..fe9c9213e5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -24,6 +24,7 @@ ;;; Copyright =C2=A9 2021, 2022 Guillaume Le Vaillant ;;; Copyright =C2=A9 2021 Nicol=C3=B2 Balzarotti ;;; Copyright =C2=A9 2022 Foo Chuan Wei +;;; Copyright =C2=A9 2022 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -3746,6 +3747,9 @@ (define-public qcustomplot "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts= .") (license license:gpl3+))) =20 +;; TODO: Split shiboken2 binding generator into a dedicated output. +;; This executable requires libxml2, libxslt, clang-toolchain at runtime. +;; The libshiboken library only requires Qt and Python at runtime. (define-public python-shiboken-2 (package (name "python-shiboken-2") @@ -3768,30 +3772,31 @@ (define-public python-shiboken-2 qtbase-5 qtxmlpatterns)) (arguments - `(#:tests? #f - ;; FIXME: Building tests fails - #:configure-flags '("-DBUILD_TESTS=3Doff") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'use-shiboken-dir-only - (lambda _ (chdir "sources/shiboken2") #t)) - (add-before 'configure 'make-files-writable-and-update-timestamps - (lambda _ - ;; The build scripts need to modify some files in - ;; the read-only source directory, and also attempts - ;; to create Zip files which fails because the Zip - ;; format does not support timestamps before 1980. - (let ((circa-1980 (* 10 366 24 60 60))) - (for-each (lambda (file) - (make-file-writable file) - (utime file circa-1980 circa-1980)) - (find-files "."))) - #t)) - (add-before 'configure 'set-build-env - (lambda* (#:key inputs #:allow-other-keys) - (let ((llvm (assoc-ref inputs "clang-toolchain"))) - (setenv "CLANG_INSTALL_DIR" llvm) - #t)))))) + (list + #:tests? #f + ;; FIXME: Building tests fails + #:configure-flags #~(list "-DBUILD_TESTS=3Doff") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'use-shiboken-dir-only + (lambda _ (chdir "sources/shiboken2") #t)) + (add-before 'configure 'make-files-writable-and-update-timestamps + (lambda _ + ;; The build scripts need to modify some files in + ;; the read-only source directory, and also attempts + ;; to create Zip files which fails because the Zip + ;; format does not support timestamps before 1980. + (let ((circa-1980 (* 10 366 24 60 60))) + (for-each (lambda (file) + (make-file-writable file) + (utime file circa-1980 circa-1980)) + (find-files "."))) + #t)) + (add-before 'configure 'set-build-env + (lambda _ + (let ((llvm #$(this-package-input "clang-toolchain"))) + (setenv "CLANG_INSTALL_DIR" llvm) + #t)))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "Shiboken generates bindings for C++ libraries using CPython source c= ode") --=20 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-python-shiboken-6.patch >From 1f1e9b864581544be3fb2e5281a5182826538807 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 19:23:31 +0800 Subject: [PATCH 2/9] gnu: Add python-shiboken-6 * gnu/packages/qt.scm (python-shiboken-6): New variable. --- gnu/packages/qt.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index fe9c9213e5..7e303a929c 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3810,6 +3810,40 @@ (define-public python-shiboken-2 license:lgpl3 license:bsd-3)))) +(define-public python-shiboken-6 + (package + (inherit python-shiboken-2) + (name "python-shiboken-6") + (version "6.3.1") + (source (origin + (method url-fetch) + (uri (string-append "https://download.qt.io/official_releases" + "/QtForPython/pyside6/PySide6-" version + "-src/pyside-setup-opensource-src-" + version ".tar.xz")) + (sha256 + (base32 + "0xwri69nnbhn6fajm7l045r0s0qv8nlq6qj8wcj87srli3b5xa75")))) + (build-system cmake-build-system) + (inputs + (modify-inputs (package-inputs python-shiboken-2) + (replace "qtbase" qtbase) + (delete "qtxmlpatterns"))) + (arguments + (substitute-keyword-arguments (package-arguments python-shiboken-2) + ((#:phases p) + #~(modify-phases #$p + (replace 'use-shiboken-dir-only + (lambda _ (chdir "sources/shiboken6") #t)))) + ((#:configure-flags flags) + #~(cons* + ;; The RUNPATH of shibokenmodule contains the entry in build + ;; directory instead of install directory. + "-DCMAKE_SKIP_RPATH=TRUE" + (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath=" + #$output "/lib") + #$flags)))))) + (define-public python-pyside-2 (package (name "python-pyside-2") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-gnu-python-pyside-2-Clarify-the-package-inputs.patch >From c60896bd5f5f1ca9dba38eae7fb3ef5b4f9cc996 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 18:26:44 +0800 Subject: [PATCH 3/9] gnu: python-pyside-2: Clarify the package inputs. The module "PySide.PyQtUiTools" depends on "qttools-5", it should be an input, not a native input. libxml2, libxslt, clang-toolchain is only used by python-shiboken-2. cmake-minimal is not used. * gnu/packages/qt.scm (python-pyside-2): [inputs]: Remove libxml2, libxslt, clang-toolchain. Add qttools-5. [native-inputs]: Use label-less input style. Remove cmake-minimal, qttools-5. [arguments]<#:phases>: Remove phase "set-clang-dir". --- gnu/packages/qt.scm | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 7e303a929c..c56333ec08 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3851,10 +3851,7 @@ (define-public python-pyside-2 (source (package-source python-shiboken-2)) (build-system cmake-build-system) (inputs - (list libxml2 - libxslt - clang-toolchain - qtbase-5 + (list qtbase-5 qtdatavis3d qtdeclarative-5 qtlocation @@ -3866,6 +3863,7 @@ (define-public python-pyside-2 qtsensors qtspeech qtsvg-5 + qttools-5 qtwebchannel-5 qtwebengine-5 qtwebsockets-5 @@ -3874,10 +3872,7 @@ (define-public python-pyside-2 (propagated-inputs (list python-shiboken-2)) (native-inputs - `(("cmake" ,cmake-minimal) - ("python" ,python-wrapper) - ("qttools-5" ,qttools-5) - ("which" ,which))) + (list python-wrapper)) (arguments `(#:tests? #f ;; FIXME: Building tests fail. @@ -3930,12 +3925,7 @@ (define-public python-pyside-2 (setenv "CXXFLAGS" (fold (lambda (dir paths) (string-append paths " -I" dir)) "" - dirs))))) - (add-before 'configure 'set-clang-dir - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "clang-toolchain"))) - (setenv "CLANG_INSTALL_DIR" clang) - #t)))))) + dirs)))))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "The Qt for Python product enables the use of Qt5 APIs in Python applications") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0004-gnu-python-pyside-2-Use-G-expressions.patch >From d989a404a0199807ac648ebbec75a1686d6b6eca Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Wed, 24 Aug 2022 19:25:26 +0800 Subject: [PATCH 4/9] gnu: python-pyside-2: Use G-expressions. * gnu/packages/qt.scm (python-pyside-2)[native-inputs]: Use label-less input style. [arguments]: Use G-expressions. <#:configure-flags>: Use "this-package-native-input". <#:phases>: In phase "fix-qt-module-detection", use "this-package-input". --- gnu/packages/qt.scm | 108 ++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 50 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index c56333ec08..ce56efd0d8 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3874,58 +3874,66 @@ (define-public python-pyside-2 (native-inputs (list python-wrapper)) (arguments - `(#:tests? #f - ;; FIXME: Building tests fail. - #:configure-flags - (list "-DBUILD_TESTS=FALSE" - (string-append "-DPYTHON_EXECUTABLE=" - (assoc-ref %build-inputs "python") - "/bin/python")) - #:modules ((guix build cmake-build-system) + (list + #:tests? #f + ;; FIXME: Building tests fail. + #:configure-flags + #~(list "-DBUILD_TESTS=FALSE" + (string-append "-DPYTHON_EXECUTABLE=" + #$(this-package-native-input "python-wrapper") + "/bin/python")) + #:modules '((guix build cmake-build-system) (guix build utils) (srfi srfi-1)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'go-to-source-dir - (lambda _ (chdir "sources/pyside2") #t)) - (add-after 'go-to-source-dir 'fix-qt-module-detection - (lambda* (#:key inputs #:allow-other-keys) - ;; Activate qt module support even if it not in the same - ;; directory as qtbase. - (substitute* "../cmake_helpers/helpers.cmake" - (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") - "true")) - ;; Add include directories for qt modules. - (let ((dirs (map (lambda (name) - (string-append (assoc-ref inputs name) - "/include/qt5")) - '("qtdatavis3d" - "qtdeclarative" - "qtlocation" - "qtmultimedia" - "qtquickcontrols" - "qtquickcontrols2" - "qtscript" - "qtscxml" - "qtsensors" - "qtspeech" - "qtsvg" - "qttools-5" - "qtwebchannel" - "qtwebengine" - "qtwebsockets" - "qtx11extras" - "qtxmlpatterns")))) - (substitute* "cmake/Macros/PySideModules.cmake" - (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all) - (fold (lambda (dir paths) - (string-append paths "${PATH_SEP}" dir)) - all - dirs))) - (setenv "CXXFLAGS" (fold (lambda (dir paths) - (string-append paths " -I" dir)) - "" - dirs)))))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'go-to-source-dir + (lambda _ (chdir "sources/pyside2") #t)) + (add-after 'go-to-source-dir 'fix-qt-module-detection + (lambda _ + ;; Activate qt module support even if it not in the same + ;; directory as qtbase. + (substitute* "../cmake_helpers/helpers.cmake" + (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") + "true")) + ;; Add include directories for qt modules. + (let ((dirs (map (lambda (path) + (string-append path "/include/qt5")) + (list + #$@(map (lambda (name) + (this-package-input name)) + '("qtdatavis3d" + "qtdeclarative" + "qtlocation" + "qtmultimedia" + "qtquickcontrols" + "qtquickcontrols2" + "qtscript" + "qtscxml" + "qtsensors" + "qtspeech" + "qtsvg" + "qttools" + "qtwebchannel" + "qtwebengine" + "qtwebsockets" + "qtx11extras" + "qtxmlpatterns")))))) + (substitute* "cmake/Macros/PySideModules.cmake" + (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all) + (fold (lambda (dir paths) + (string-append paths "${PATH_SEP}" dir)) + all + dirs))) + (setenv "CXXFLAGS" (fold (lambda (dir paths) + (string-append paths " -I" dir)) + "" + dirs))))) + (add-before 'configure 'set-clang-dir + (lambda* (#:key inputs #:allow-other-keys) + (let ((clang (assoc-ref inputs "clang-toolchain"))) + (setenv "CLANG_INSTALL_DIR" clang) + #t)))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "The Qt for Python product enables the use of Qt5 APIs in Python applications") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0005-gnu-Add-python-pyside-6.patch >From 73991a4c298292cc1358eb41dc6fb704ff9ca737 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 12:42:54 +0800 Subject: [PATCH 5/9] gnu: Add python-pyside-6. * gnu/packages/qt.scm (python-pyside-6): New variable. --- gnu/packages/qt.scm | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index ce56efd0d8..8612e3b536 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -3955,6 +3955,78 @@ (define-public python-pyside-2 license:gpl3 license:gpl2)))) +(define-public python-pyside-6 + (package + (inherit python-pyside-2) + (name "python-pyside-6") + (version (package-version python-shiboken-6)) + (source (package-source python-shiboken-6)) + ;; TODO: Add more Qt components if available. + (inputs + (list qtbase + qtdeclarative + qtmultimedia + qtnetworkauth + qtpositioning + qtsvg + qttools + qtwebchannel + qtwebengine + qtwebsockets)) + (propagated-inputs + (list python-shiboken-6)) + (native-inputs + (list python-wrapper)) + (arguments + (list + #:tests? #f + #:configure-flags + #~(list "-DBUILD_TESTS=FALSE" + (string-append "-DPYTHON_EXECUTABLE=" + #$(this-package-native-input "python-wrapper") + "/bin/python")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'go-to-source-dir + (lambda _ (chdir "sources/pyside6") #t)) + (add-after 'go-to-source-dir 'fix-qt-module-detection + (lambda _ + (substitute* "cmake/PySideHelpers.cmake" + (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)") + "true")) + (let ((dirs (map (lambda (path) + (string-append path "/include/qt6")) + (list + #$@(map (lambda (name) + (this-package-input name)) + '("qtdeclarative" + "qtmultimedia" + "qtnetworkauth" + "qtpositioning" + "qtsvg" + "qttools" + "qtwebchannel" + "qtwebengine" + "qtwebsockets")))))) + (substitute* "cmake/Macros/PySideModules.cmake" + (("set\\(shiboken_include_dir_list " all) + (string-append all (string-join dirs ";") " "))) + (setenv "CXXFLAGS" + (string-join + (map (lambda (dir) + (string-append "-I" dir)) + dirs) + " ")))))))) + (synopsis + "The Qt for Python product enables the use of Qt6 APIs in Python applications") + (description + "The Qt for Python product enables the use of Qt6 APIs in Python +applications. It lets Python developers utilize the full potential of Qt, +using the PySide6 module. The PySide6 module provides access to the +individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also +comes with the Shiboken6 CPython binding code generator, which can be used to +generate Python bindings for your C or C++ code."))) + (define-public python-pyside-2-tools (package (name "python-pyside-2-tools") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0006-gnu-python-pyside-2-tools-Use-G-expressions.patch >From a9203c3b185e23283470984072434f939dcb75cc Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 13:02:46 +0800 Subject: [PATCH 6/9] gnu: python-pyside-2-tools: Use G-expressions. * gnu/packages/qt.scm (python-pyside2-tools)[native-inputs]: Use label-less style. [arguments]: Use G-expressions. <#:configure-flags>: Use "this-package-native-input". --- gnu/packages/qt.scm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 8612e3b536..d9f98c0afb 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4036,17 +4036,19 @@ (define-public python-pyside-2-tools (inputs (list python-pyside-2 python-shiboken-2 qtbase-5)) (native-inputs - `(("python" ,python-wrapper))) + (list python-wrapper)) (arguments - `(#:tests? #f - #:configure-flags - (list "-DBUILD_TESTS=off" - (string-append "-DPYTHON_EXECUTABLE=" - (assoc-ref %build-inputs "python") - "/bin/python")) - #:phases (modify-phases %standard-phases - (add-after 'unpack 'go-to-source-dir - (lambda _ (chdir "sources/pyside2-tools") #t))))) + (list + #:tests? #f + #:configure-flags + #~(list "-DBUILD_TESTS=off" + (string-append "-DPYTHON_EXECUTABLE=" + #$(this-package-native-inputs "python-wrapper") + "/bin/python")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'go-to-source-dir + (lambda _ (chdir "sources/pyside2-tools") #t))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis "Contains command line tools for PySide2") -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0007-gnu-python-pyside-2-tools-Fix-synopsis-and-descripti.patch >From b854a349cc43fde5fdfdf124e3474175d25a0ab1 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 13:04:45 +0800 Subject: [PATCH 7/9] gnu: python-pyside-2-tools: Fix synopsis and description. * gnu/packages/qt.scm (python-pyside2-tools)[synopsis]: Use more descriptive words. [description]: Ditto. --- gnu/packages/qt.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index d9f98c0afb..3d9bb45483 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4051,9 +4051,9 @@ (define-public python-pyside-2-tools (lambda _ (chdir "sources/pyside2-tools") #t))))) (home-page "https://wiki.qt.io/Qt_for_Python") (synopsis - "Contains command line tools for PySide2") + "Command line tools for PySide2") (description - "Contains lupdate, rcc and uic tools for PySide2") + "Python-pyside-2-tools contains lupdate, rcc and uic tools for PySide2") (license license:gpl2))) (define-public libqglviewer -- 2.37.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0008-gnu-Add-python-pyside-6-tools.patch >From 2409816e83098d572d099a10e45129d56ba2a607 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Thu, 25 Aug 2022 13:07:38 +0800 Subject: [PATCH 8/9] gnu: Add python-pyside-6-tools * gnu/packages/qt.scm (python-pyside-6-tools): New variable. --- gnu/packages/qt.scm | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 3d9bb45483..050bfdb768 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4043,7 +4043,7 @@ (define-public python-pyside-2-tools #:configure-flags #~(list "-DBUILD_TESTS=off" (string-append "-DPYTHON_EXECUTABLE=" - #$(this-package-native-inputs "python-wrapper") + #$(this-package-native-input "python-wrapper") "/bin/python")) #:phases #~(modify-phases %standard-phases @@ -4056,6 +4056,43 @@ (define-public python-pyside-2-tools "Python-pyside-2-tools contains lupdate, rcc and uic tools for PySide2") (license license:gpl2))) +(define-public python-pyside-6-tools + (package + (inherit python-pyside-2-tools) + (name "python-pyside-6-tools") + (version (package-version python-shiboken-6)) + (source (package-source python-shiboken-6)) + (build-system cmake-build-system) + (inputs + (list python-pyside-6 + python-shiboken-6 + qtbase + qtdeclarative + qttools)) + (arguments + (substitute-keyword-arguments (package-arguments python-pyside-2-tools) + ((#:phases p) + #~(modify-phases #$p + (replace 'go-to-source-dir + (lambda _ (chdir "sources/pyside-tools") #t)) + (add-after 'go-to-source-dir 'fix-missing-tools + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + (("\\$\\{LIBEXEC_PATH\\}/(.+)\\$" all bin) + (string-append + (search-input-file + inputs (string-append "lib/qt6/libexec/" bin)) + "$")) + (("\\$\\{TOOLS_PATH\\}/(.+)\\$" all bin) + (string-append + (search-input-file + inputs (string-append "bin/" bin)) + "$"))))))))) + (synopsis + "Command line tools for PySide6") + (description + "Python-pyside-6-tools contains lupdate, rcc and uic tools for PySide6."))) + (define-public libqglviewer (package (name "libqglviewer") -- 2.37.2 --=-=-= Content-Type: text/plain -- Retrieve my PGP public key: gpg --recv-keys 481F5EEEBA425ADC13247C76A6E672D981B8E744 Zihao --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 30 04:51:45 2022 Received: (at 57398) by debbugs.gnu.org; 30 Aug 2022 08:51:45 +0000 Received: from localhost ([127.0.0.1]:34732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSwyH-0007MF-0D for submit@debbugs.gnu.org; Tue, 30 Aug 2022 04:51:45 -0400 Received: from mail-m971.mail.163.com ([123.126.97.1]:42007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSwyD-0007Lx-E4 for 57398@debbugs.gnu.org; Tue, 30 Aug 2022 04:51:43 -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=NIQ5H LKeFvZMo3hAx7NlHHnWn0I4wwA49O5zG0bDQHI=; b=hfajMCeoEBz32UJ2/7TLI cZ/IQYb9Mxg2rNBpFtO87kPjBMkZnTa91W3tJlqkHjk3LDfwCsYtIyxwmNa1uhoL ZvVClDlhijzEhs5IW81FA73I+BnkUywNUPBEiONbPBzxXn8awkMXxGIpTAxn4akL wnyX2Wjsj3AeUZUhSCDZxQ= Received: from asus-laptop (unknown [163.125.249.44]) by smtp1 (Coremail) with SMTP id GdxpCgCHrZSQzw1jf4n0YQ--.55201S2; Tue, 30 Aug 2022 16:51:30 +0800 (CST) References: <86czcoribi.fsf@163.com> <8635dkr4v8.fsf@163.com> User-agent: mu4e 1.8.9; emacs 29.0.50 From: Zhu Zihao To: 57398@debbugs.gnu.org Subject: Re: bug#57398: Acknowledgement ([PATCH]: Add PySide 6.) Date: Tue, 30 Aug 2022 16:51:18 +0800 In-reply-to: <8635dkr4v8.fsf@163.com> Message-ID: <86k06q3yib.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain X-CM-TRANSID: GdxpCgCHrZSQzw1jf4n0YQ--.55201S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRVyxRDUUUU X-Originating-IP: [163.125.249.44] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBLxptr2HmoNpW1AAAsI X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57398 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ping. -- Retrieve my PGP public key: gpg --recv-keys 481F5EEEBA425ADC13247C76A6E672D981B8E744 Zihao From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 07 07:28:29 2022 Received: (at 57398) by debbugs.gnu.org; 7 Sep 2022 11:28:29 +0000 Received: from localhost ([127.0.0.1]:53701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVtEL-0006iS-4y for submit@debbugs.gnu.org; Wed, 07 Sep 2022 07:28:29 -0400 Received: from mail-m975.mail.163.com ([123.126.97.5]:27504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVtEH-0006i2-Pj for 57398@debbugs.gnu.org; Wed, 07 Sep 2022 07:28:27 -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=TUc+0 C04iM8W6AWPZOikxxHnf9yNzfxtCXUAg8Q5n0c=; b=Emn2ijmfzp7a7MwHktiFi 7Iqvss9co3VtOYNbe3tDLjziQS0XPEjC4FvT8PAU72fni6kUK06BUXLNsaEbdpWJ lDAHpdkskDE+4H2sVJvs8ez7H150pnBTXuZY6hEAjq8mrmD/R9eFVC+ym+M9tZSe BNYiL/ivllkeEwhmnZDs/Q= Received: from asus-laptop (unknown [163.125.249.61]) by smtp5 (Coremail) with SMTP id HdxpCgAXnhZNgBhjRZViag--.12287S2; Wed, 07 Sep 2022 19:28:14 +0800 (CST) References: <86czcoribi.fsf@163.com> <8635dkr4v8.fsf@163.com> <86k06q3yib.fsf@163.com> User-agent: mu4e 1.8.9; emacs 29.0.50 From: Zhu Zihao To: 57398@debbugs.gnu.org Subject: Re: bug#57398: Acknowledgement ([PATCH]: Add PySide 6.) Date: Wed, 07 Sep 2022 19:27:21 +0800 In-reply-to: <86k06q3yib.fsf@163.com> Message-ID: <86v8pzifvm.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-CM-TRANSID: HdxpCgAXnhZNgBhjRZViag--.12287S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRVT5HDUUUU X-Originating-IP: [163.125.249.61] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBaxF1r1et6a8NZgACs1 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 57398 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable ping again. =2D-=20 Retrieve my PGP public key: gpg --recv-keys 481F5EEEBA425ADC13247C76A6E672D981B8E744 Zihao --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQT4UAIrVkIEZilSHr2K2nJqP6LM8gUCYxiAHRUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQitpyaj+izPK4kQEA6tYFNN/y158d/s2aTGB2RFWbNPZg o1TYhf2EErums1cBALYBV8iDUojXbabzHsmmApg0t9khHy/ySt4XY0+8BlQD =JGgA -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 07 13:51:18 2022 Received: (at 57398-done) by debbugs.gnu.org; 7 Sep 2022 17:51:18 +0000 Received: from localhost ([127.0.0.1]:56118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzCo-0006qx-Bi for submit@debbugs.gnu.org; Wed, 07 Sep 2022 13:51:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzCm-0006ql-Pb for 57398-done@debbugs.gnu.org; Wed, 07 Sep 2022 13:51:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVzCh-0006yv-IO; Wed, 07 Sep 2022 13:51:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Ep2od3OG4jE1nERgHB2pjwx9+XQ9Ntt2uvzC7B+HyiM=; b=Dn1CFnukXtYmmNdmDVEd vv6Dr6hU7MdK0v38n/revAdA2x5e1G5YxlhodKHmE1JVajJnDR9O5r0WRf+6CdeuMFdRRz5kzilWK WXsSyt+iYG8usG2amBfc4nMdfFk1sRfdElDN/e2tWk6D3TpWBLpNpxLyO/ohUsrhKcPa5rl8bcP9V /EFgczM//FX7u7g6waLoWkWduOG1ytopUXsEKaiQZLXu5H/RwjYfqiq3gJHviWELPlG+YijLILYaP IN7srB+Raz3S4HwsKzWt1ESpw3rlMsCanTnfmNiMq47YbPFBqnNo3hnOlYmA7Zf8aDVK+EG4px8om FxxjfrGGeIh5NA==; Received: from [84.214.173.6] (port=49612 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVzCg-0005hy-3g; Wed, 07 Sep 2022 13:51:11 -0400 From: Marius Bakke To: Zhu Zihao , 57398-done@debbugs.gnu.org Subject: Re: [bug#57398] [PATCH]: Add PySide 6. In-Reply-To: <86czcoribi.fsf@163.com> References: <86czcoribi.fsf@163.com> Date: Wed, 07 Sep 2022 19:51:06 +0200 Message-ID: <87zgfbul85.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57398-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Hi Zhu, Thanks for these patches, nice work! I've applied them with a few minor tweaks, see inline. Zhu Zihao skriver: >>>From a4d31ffc721fa3b459e2f168cb4af65147b82248 Mon Sep 17 00:00:00 2001 > From: Zhu Zihao > Date: Wed, 24 Aug 2022 19:25:26 +0800 > Subject: [PATCH 3/9] gnu: python-pyside-2: Use G-expressions. > > * gnu/packages/qt.scm (python-pyside-2)[native-inputs]: Use label-less input > style. > [arguments]: Use G-expressions. [...] > (native-inputs > - `(("cmake" ,cmake-minimal) > - ("python" ,python-wrapper) > - ("qttools-5" ,qttools-5) > - ("which" ,which))) > + (list cmake-minimal python-wrapper qttools-5 which)) [...] > + ;; Add include directories for qt modules. > + (let ((dirs (map (lambda (name) > + (string-append (assoc-ref inputs name) > + "/include/qt5")) > + '("qtdatavis3d" > + "qtdeclarative" > + "qtlocation" > + "qtmultimedia" > + "qtquickcontrols" > + "qtquickcontrols2" > + "qtscript" > + "qtscxml" > + "qtsensors" > + "qtspeech" > + "qtsvg" > + "qttools-5" Here qttools-5 would no longer be found, so I changed it. >>>From 801e4315b1ef24fc18cf61169b42443eb221e924 Mon Sep 17 00:00:00 2001 > From: Zhu Zihao > Date: Wed, 24 Aug 2022 22:57:44 +0800 > Subject: [PATCH 5/9] gnu: python-pyside-2: Use "this-package-input" instead of > "assoc-ref". > > * gnu/packages/qt.scm (python-pyside-2)[arguments]<#:configure-flags>: Use > "this-package-input" > <#:phases>: In phase "fix-qt-module-detection", use "this-package-input". I had to manually apply this patch because I changed the previous one. While at it, I made one tweak: > @@ -3880,7 +3880,7 @@ (define-public python-pyside-2 > #:configure-flags > #~(list "-DBUILD_TESTS=FALSE" > (string-append "-DPYTHON_EXECUTABLE=" > - (assoc-ref %build-inputs "python") > + #$(this-package-native-input "python-wrapper") > "/bin/python")) I changed this to use (search-input-file ...) instead of #$(this-package-native-input ...). And the same in subsequent patches. The reason is that THIS-PACKAGE has a runtime cost (meaning the "guix" commands get slower), but SEARCH-INPUT-FILE is computed at build time. In short, always use SEARCH-INPUT-FILE when feasible. :-) Applied all 9 with these changes! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYxjaCg8cbWFyaXVzQGdu dS5vcmcACgkQ6HGLpZEUEHc75QD/eCVJnCc2DUzZNuo2JEpcpf+7K7BSDR741Qoa kyWxKu4BAN8v9nVAuXDvGGW+Nz3m6LxDbpJ8kxSTtRep21ADDhsB =8OPI -----END PGP SIGNATURE----- --=-=-=-- From unknown Sat Aug 16 20:59:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Oct 2022 11:24:16 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator