From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qDkRDBdQB2NSewAAbAwnHQ (envelope-from ) for ; Thu, 25 Aug 2022 12:33:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cLOkChdQB2OE7wAAauVa8A (envelope-from ) for ; Thu, 25 Aug 2022 12:33:59 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1A39E33759 for ; Thu, 25 Aug 2022 12:33:58 +0200 (CEST) Received: from localhost ([::1]:40232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRABP-0007iP-DI for larch@yhetil.org; Thu, 25 Aug 2022 06:33:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRAAZ-000731-9K for guix-patches@gnu.org; Thu, 25 Aug 2022 06:33:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRAAY-0002Fx-Sa for guix-patches@gnu.org; Thu, 25 Aug 2022 06:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRAAY-0007UK-Mu for guix-patches@gnu.org; Thu, 25 Aug 2022 06:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57398] Acknowledgement ([PATCH]: Add PySide 6.) Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Aug 2022 10:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57398 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57398@debbugs.gnu.org Received: via spool by 57398-submit@debbugs.gnu.org id=B57398.166142354628690 (code B ref 57398); Thu, 25 Aug 2022 10:33:02 +0000 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 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-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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661423638; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=WigeJFlOpV88ByGnKIbBtCT7JTxgfx/oDOR2v5vleqQ=; b=gmSzTVIqS7mpn0c+lhtrbE2CPjha687zi3f3bvL7onhbG44DBMSlZ/jMQNlFWSYmDesmhw Nau5fGID1YDAA6PoaJWMWXWQBIyPhEdksIWUrjHGdBnAiODSFnNvo9Jpsd98K7skoSCafv 0PeArYPBf2P1xZ+kJPaO6OEPofyfEQSNiBN5IkHYYp8p+8V7JLtuvmELemxu5mRPHH+17G Uk8PFAq4cVTmzFitjjmNix/pWZ2JNGAwNL9+vyqJhE64Qby4Aqp9y7WLlFu4AJgwl4mbvP s6nft1AYeyNOuekuBcA7CkEpKJoCHlRjL4RtnjBd/u1nAzFPeZUflAwjglD6/A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661423638; a=rsa-sha256; cv=none; b=Vb2Eq0MO0SblpRcdHqxSaRjHy44EcwYgnI/UejXZxrrlOfzsYOg5bd+aHNhTY5ugKnXnSQ Exfk07m4nMYXNS/NzUBNryHZjX6km+PgDVIjzM9SMoEg4dw9Qa9U1CC9biRHbn3q4QsvTc PS+esrB+gHjyKLDss1KC9Xj6lLcUczBadjuF5/NFnnh4mWnrRehuYDDyEkFv8Mwubr3FbT XG9hg6+PUMi/JwWaRl+SKnQq2LHB6WkmAKy2DpiKMrHz3660iLQ0QgFoQuoHRNQ9lusTD2 PI2jR/GI9/IsGGL1JJOaYxFm2fwh45ZBWHoKIBqkTjvGi0RdaEi5Lt0lE454Tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=R4Dp8mgN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=R4Dp8mgN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1A39E33759 X-Spam-Score: 6.19 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7uVMscaYWezN --=-=-= 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 --=-=-=--