diff mbox series

[bug#68052,1/4] gnu: python-poppler-qt5: update to 21.3.0

Message ID 20231226231408.6f2caeb5@libero.it
State New
Headers show
Series Collected patches fixing builds of various Frescobaldi dependencies | expand

Commit Message

Marco Rimoldi Dec. 26, 2023, 10:14 p.m. UTC
* gnu/packages/pdf.scm (python-poppler-qt5): Update tp 21.3.0
[build-system]: Change to pyproject, fix previous build failure.

Change-Id: I30d6e2a3180505091d8072ed452211b0bb3a0178
---
 gnu/packages/pdf.scm | 37 +++++++++++++------------------------
 1 file changed, 13 insertions(+), 24 deletions(-)

Comments

Maxim Cournoyer Jan. 4, 2024, 6 p.m. UTC | #1
Hello,

Marco Rimoldi <rimarko@libero.it> writes:

> * gnu/packages/pdf.scm (python-poppler-qt5): Update tp 21.3.0

Please end complete sentences by a final period (also in the commit
summary).

> [build-system]: Change to pyproject, fix previous build failure.

The changelog should ideally detail each change, such as specifying the
'sipbuild.api' backend.

> Change-Id: I30d6e2a3180505091d8072ed452211b0bb3a0178
> ---
>  gnu/packages/pdf.scm | 37 +++++++++++++------------------------
>  1 file changed, 13 insertions(+), 24 deletions(-)
>
> diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
> index 644a4617a6..787f5a2a6f 100644
> --- a/gnu/packages/pdf.scm
> +++ b/gnu/packages/pdf.scm
> @@ -415,40 +415,29 @@ (define-public poppler-qt5
>  (define-public python-poppler-qt5
>    (package
>      (name "python-poppler-qt5")
> -    (version "21.1.0")
> +    (version "21.3.0")
>      (source
>        (origin
>          (method url-fetch)
>          (uri (pypi-uri "python-poppler-qt5" version))
>          (sha256
>           (base32
> -          "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd"))
> -       (patches (search-patches "python-poppler-qt5-fix-build.patch"))))

Patches are also registered in the build system in gnu/local.mk, and
need to be de-registered there.

> -    (build-system python-build-system)
> +          "1q3gvmsmsq3llf9mcbhlkryrgprqrw2z7wmnvagy180f3y2fhxxl"))))
> +    (build-system pyproject-build-system)
>      (arguments
> -     `(;; There are no tests.  The check phase just causes a rebuild.
> -       #:tests? #f
> -       #:phases
> -       (modify-phases %standard-phases
> -         (replace 'build
> -           (lambda* (#:key inputs #:allow-other-keys)
> -             (substitute* "setup.py"
> -               ;; This check always fails, so disable it.
> -               (("if not check_qtxml\\(\\)")
> -                "if True"))
> -             ;; We need to pass an extra flag here.  This cannot be in
> -             ;; configure-flags because it should not be passed for the
> -             ;; installation phase.
> -             ((@@ (guix build python-build-system) call-setuppy)
> -              "build_ext" (list (string-append "--pyqt-sip-dir="
> -                                               (assoc-ref inputs "python-pyqt")
> -                                               "/share/sip")) #t))))))
> +     `(
> +       ;; The backend builder expects a Python dictionary as per
> +       ;; https://peps.python.org/pep-0517/#config-settings, but we
> +       ;; give it lists and it fails. The next line is a workaround.

Please use double space after period (that's an Emacs/Texinfo/Scheme
convention that allows navigating between sentences in Emacs).

> +       #:configure-flags '#nil
> +       #:build-backend "sipbuild.api"
> +       #:tests? #f))
>      (native-inputs
>       (list pkg-config))
>      (inputs
> -     (list python-sip-4 python-pyqt poppler-qt5 qtbase-5))
> -    (home-page "https://pypi.org/project/python-poppler-qt5/")
> -    (synopsis "Python bindings for Poppler-Qt5")
> +     (list python-sip python-pyqt-builder python-pyqt poppler-qt5 qtbase-5))
> +    (home-page "https://github.com/frescobaldi/python-poppler-qt5")
> +    (synopsis "Python binding to Poppler-Qt5")
>      (description
>       "This package provides Python bindings for the Qt5 interface of the
>  Poppler PDF rendering library.")

The rest LGTM.
diff mbox series

Patch

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 644a4617a6..787f5a2a6f 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -415,40 +415,29 @@  (define-public poppler-qt5
 (define-public python-poppler-qt5
   (package
     (name "python-poppler-qt5")
-    (version "21.1.0")
+    (version "21.3.0")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "python-poppler-qt5" version))
         (sha256
          (base32
-          "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd"))
-       (patches (search-patches "python-poppler-qt5-fix-build.patch"))))
-    (build-system python-build-system)
+          "1q3gvmsmsq3llf9mcbhlkryrgprqrw2z7wmnvagy180f3y2fhxxl"))))
+    (build-system pyproject-build-system)
     (arguments
-     `(;; There are no tests.  The check phase just causes a rebuild.
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'build
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "setup.py"
-               ;; This check always fails, so disable it.
-               (("if not check_qtxml\\(\\)")
-                "if True"))
-             ;; We need to pass an extra flag here.  This cannot be in
-             ;; configure-flags because it should not be passed for the
-             ;; installation phase.
-             ((@@ (guix build python-build-system) call-setuppy)
-              "build_ext" (list (string-append "--pyqt-sip-dir="
-                                               (assoc-ref inputs "python-pyqt")
-                                               "/share/sip")) #t))))))
+     `(
+       ;; The backend builder expects a Python dictionary as per
+       ;; https://peps.python.org/pep-0517/#config-settings, but we
+       ;; give it lists and it fails. The next line is a workaround.
+       #:configure-flags '#nil
+       #:build-backend "sipbuild.api"
+       #:tests? #f))
     (native-inputs
      (list pkg-config))
     (inputs
-     (list python-sip-4 python-pyqt poppler-qt5 qtbase-5))
-    (home-page "https://pypi.org/project/python-poppler-qt5/")
-    (synopsis "Python bindings for Poppler-Qt5")
+     (list python-sip python-pyqt-builder python-pyqt poppler-qt5 qtbase-5))
+    (home-page "https://github.com/frescobaldi/python-poppler-qt5")
+    (synopsis "Python binding to Poppler-Qt5")
     (description
      "This package provides Python bindings for the Qt5 interface of the
 Poppler PDF rendering library.")