Subject: Re: [bug#57431] [PATCH v1 2/3] gnu: Add python-pyqt, version 6.5.2.

From: Ludovic Courtès <[email-masked]>
Date: Wed, 22 Nov 2023 16:47:46 +0100

Herman Rimm <[email-masked]> skribis:

> From: Zhu Zihao <[email-masked]>
>
> * gnu/packages/qt.scm (python-pyqt-6): New variable.

[...]

> +    (inputs ; Qt5 dependencies only in python-pyqt:
> +     ; (qt)connectivity, location, sensors, serialport, x11extras, xmlpatterns.
> +     `(("python" ,python-wrapper)
> +       ("qtbase" ,qtbase)
> +       ("qtdeclarative" ,qtdeclarative)
> +       ("qtmultimedia" ,qtmultimedia)
> +       ("qtpositioning" ,qtpositioning)
> +       ("qtsvg" ,qtsvg)
> +       ("qttools" ,qttools)
> +       ("qtwebchannel" ,qtwebchannel)
> +       ("qtwebsockets" ,qtwebsockets)))

Could you run ‘guix style -f inputs --input-simplification=always python-pyqt-6’?

> +       #:phases
> +       #~(modify-phases %standard-phases
> +         ;; When building python-pyqtwebengine, <qprinter.h> can not be
> +         ;; included.  Here we substitute the full path to the header in the
> +         ;; store.
> +         (add-after 'unpack 'substitute-source
> +           (lambda* (#:key inputs  #:allow-other-keys)
> +             (let* ((qtbase (assoc-ref inputs "qtbase"))
> +                    (qtprinter.h (string-append "\"" qtbase "/include/qt6/QtPrintSupport/qprinter.h\"")))

I understand it’s copied from ‘python-pyqt’ but IWBN to write it along
these lines:

  (let ((qtprinter.h
         (search-input-file inputs
                            "/include/qt6/QtPrintSupport/qprinter.h")))
    …)

(We could make the same changes in ‘python-pyqt’ in a separate patch.)

Thanks,
Ludo’.