diff mbox series

[bug#57398] : Add PySide 6.

Message ID 86czcoribi.fsf@163.com
State Accepted
Headers show
Series [bug#57398] : Add PySide 6. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Zhu Zihao Aug. 25, 2022, 5:38 a.m. UTC

Comments

Marius Bakke Sept. 7, 2022, 5:51 p.m. UTC | #1
Hi Zhu,

Thanks for these patches, nice work!

I've applied them with a few minor tweaks, see inline.

Zhu Zihao <all_but_last@163.com> skriver:

>>From a4d31ffc721fa3b459e2f168cb4af65147b82248 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> 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 <all_but_last@163.com>
> 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!
diff mbox series

Patch

From 2669f1f0dd7a2688f0dcaf913649a24640a68f7c Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
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