[PATCH 0/4] Collected patches fixing builds of various Frescobaldi dependencies

  • Done
  • quality assurance status badge
Details
3 participants
  • Christopher Baines
  • Maxim Cournoyer
  • Marco Rimoldi
Owner
unassigned
Submitted by
Marco Rimoldi
Severity
normal
M
M
Marco Rimoldi wrote on 26 Dec 2023 23:10
(address . guix-patches@gnu.org)
cover.1703627648.git.rimarko@libero.it
I resubmit here the patches I've sent separately in the last couple of days, for your convenience. My apologies.

* Fixed builds for python-poppler-qt5, python-pyportmidi, frescobaldi.
* Added up-to-date variant definition for portmidi.

Marco Rimoldi (4):
gnu: python-poppler-qt5: update to 21.3.0
gnu : python-poppler-qt5: Remove no longer needed patch
gnu: python-pyportmidi: Update to latest git revision, fixing build
fail.
gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4

gnu/packages/music.scm | 73 +++++++----
.../python-poppler-qt5-fix-build.patch | 116 ------------------
gnu/packages/pdf.scm | 37 ++----
3 files changed, 62 insertions(+), 164 deletions(-)
delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch


base-commit: 103dc351111d7aff82b7b7883f79084faaa54abc
--
2.41.0
M
M
Marco Rimoldi wrote on 26 Dec 2023 23:14
[PATCH 1/4] gnu: python-poppler-qt5: update to 21.3.0
(address . 68052@debbugs.gnu.org)
20231226231408.6f2caeb5@libero.it
* 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(-)

Toggle diff (60 lines)
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.")
--
2.41.0
M
M
Marco Rimoldi wrote on 26 Dec 2023 23:14
[PATCH 2/4] gnu : python-poppler-qt5: Remove no longer needed patch
(address . 68052@debbugs.gnu.org)
32f6fa9d4a9ec6dc4932a04901788a3e6789055c.1703627648.git.rimarko@libero.it
Change-Id: Ie5f6039dcfd8e6d1315e969dc12dafb158a8cc10
---
.../python-poppler-qt5-fix-build.patch | 116 ------------------
1 file changed, 116 deletions(-)
delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch

Toggle diff (124 lines)
diff --git a/gnu/packages/patches/python-poppler-qt5-fix-build.patch b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
deleted file mode 100644
index 099bb86d2f..0000000000
--- a/gnu/packages/patches/python-poppler-qt5-fix-build.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Patch taken from the upstream repository
-https://github.com/frescobaldi/python-poppler-qt5/issues/43
-
-From 92e5962ec3751ab051d0b655fd61afc7a1cf709e Mon Sep 17 00:00:00 2001
-From: Ben Greiner <code@bnavigator.de>
-Date: Thu, 4 Mar 2021 17:02:51 +0100
-Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
- FormFieldChoice::choicesWithExportValues() (#45)
-
----
- types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
-diff --git a/types.sip b/types.sip
-index 239b8c9..81cb283 100644
---- a/types.sip
-+++ b/types.sip
-@@ -331,5 +331,98 @@ template <TYPE>
- };
-
-
-+/**
-+ * Convert QVector< QPair<TYPE, TYPE> >
-+ * from and to a Python list of a 2-item tuple
-+ */
-+
-+template<TYPE>
-+%MappedType QVector< QPair<TYPE, TYPE> >
-+{
-+%TypeHeaderCode
-+#include <qvector.h>
-+#include <qpair.h>
-+%End
-+
-+%ConvertFromTypeCode
-+ // Create the list.
-+ PyObject *l;
-+
-+ if ((l = PyList_New(sipCpp->size())) == NULL)
-+ return NULL;
-+
-+ // Set the list elements.
-+ for (int i = 0; i < sipCpp->size(); ++i)
-+ {
-+ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
-+ PyObject *ptuple = PyTuple_New(2);
-+ PyObject *pfirst;
-+ PyObject *psecond;
-+
-+ TYPE *sfirst = new TYPE(p->first);
-+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 0, pfirst);
-+
-+ TYPE *ssecond = new TYPE(p->second);
-+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ Py_DECREF(pfirst);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 1, psecond);
-+
-+ PyList_SET_ITEM(l, i, ptuple);
-+ }
-+
-+ return l;
-+%End
-+
-+%ConvertToTypeCode
-+ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
-+
-+ // Check the type if that is all that is required.
-+ if (sipIsErr == NULL)
-+ {
-+ if (!PySequence_Check(sipPy))
-+ return 0;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE))
-+ return 0;
-+
-+ return 1;
-+ }
-+
-+
-+ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ {
-+ int state;
-+ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
-+
-+ if (*sipIsErr)
-+ {
-+ sipReleaseType(p, qpair_type, state);
-+ delete qv;
-+ return 0;
-+ }
-+ qv->append(*p);
-+ sipReleaseType(p, qpair_type, state);
-+ }
-+
-+ *sipCppPtr = qv;
-+ return sipGetState(sipTransferObj);
-+%End
-+
-+};
-+
-
- /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
--
2.41.0
M
M
Marco Rimoldi wrote on 26 Dec 2023 23:15
[PATCH 3/4] gnu: python-pyportmidi: Update to latest git revision, fixing build fail.
(address . 68052@debbugs.gnu.org)
f8e15b79edc966a07b01d8f6629fc2c5124fc31a.1703627648.git.rimarko@libero.it
Change-Id: Ibe02edca39731f3f3c9001818665d2da97df9465
---
gnu/packages/music.scm | 52 ++++++++++++++++++------------------------
1 file changed, 22 insertions(+), 30 deletions(-)

Toggle diff (65 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 77e952d383..6f1736a276 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3048,36 +3048,28 @@ (define-public portmidi
(license license:expat)))
(define-public python-pyportmidi
- (package
- (name "python-pyportmidi")
- (version (package-version portmidi))
- (source (package-source portmidi))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f ; no tests included
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-dir
- (lambda _ (chdir "pm_python") #t))
- (add-after 'enter-dir 'fix-setup.py
- (lambda _
- (substitute* "setup.py"
- ;; Use Python 3 syntax
- (("print (\".*\")" _ text)
- (string-append "print(" text ")\n"))
- ;; TODO.txt and CHANGES.txt don't exist
- (("CHANGES =.*") "CHANGES = \"\"\n")
- (("TODO =.*") "TODO = \"\"\n"))
- #t)))))
- (inputs
- (list portmidi alsa-lib))
- (native-inputs
- (list python-cython unzip))
- (home-page "https://portmedia.sourceforge.net/portmidi/")
- (synopsis "Python bindings to PortMidi")
- (description
- "This package provides Python bindings to the PortMidi library.")
- (license license:expat)))
+ (let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
+ (revision "0"))
+ (package
+ (name "python-pyportmidi")
+ (version (git-version "0.0.7" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PortMidi/pm_python.git")
+ (commit commit)))
+ (sha256 (base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
+ (file-name (git-file-name name version))))
+ (build-system python-build-system)
+ (inputs
+ (list portmidi alsa-lib))
+ (native-inputs
+ (list python-cython))
+ (home-page "https://github.com/PortMidi")
+ (synopsis "Python bindings to PortMidi")
+ (description
+ "This package provides Python bindings to the PortMidi library.")
+ (license license:expat))))
(define-public frescobaldi
(package
--
2.41.0
M
M
Marco Rimoldi wrote on 26 Dec 2023 23:16
[PATCH 4/4] gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4
(address . 68052@debbugs.gnu.org)
78e978968bbff5e9275bd1e75442eed18f15e8bb.1703627648.git.rimarko@libero.it
Tested with package Frescobaldi. Other packages dependent on the old 217 version still need to be tested and updated so that it can be phased out.

Change-Id: I2530d206e19e885082a95f1aac65348e7a51d4ca
---
gnu/packages/music.scm | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6f1736a276..c485bf1620 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3047,6 +3047,39 @@ (define-public portmidi
using a system-independent interface.")
(license license:expat)))
+(define-public portmidi-2
+ (package
+ (name "portmidi")
+ (version "2.0.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/PortMidi/portmidi/archive/refs/tags/v"
+ version ".zip"))
+ (sha256
+ (base32
+ "00xdlxd470zpbvvjb8km516y3mbpkv3487y1irn0qs1d38b18mys"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; tests are interactive and can be found in the
+ #:configure-flags ; pm_tests/ directory of the build tree
+ (list "-DBUILD_PORTMIDI_TESTS=On")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-version
+ (lambda _ (substitute* "CMakeLists.txt"
+ (("2.0.3") (version))))))))
+ (inputs
+ (list alsa-lib))
+ (native-inputs
+ (list unzip))
+ (home-page "https://github.com/PortMidi/")
+ (synopsis "Library for MIDI I/O")
+ (description
+ "PortMidi is a library supporting real-time input and output of MIDI data
+using a system-independent interface.")
+ (license license:expat)))
+
(define-public python-pyportmidi
(let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
(revision "0"))
@@ -3062,7 +3095,7 @@ (define-public python-pyportmidi
(file-name (git-file-name name version))))
(build-system python-build-system)
(inputs
- (list portmidi alsa-lib))
+ (list portmidi-2 alsa-lib))
(native-inputs
(list python-cython))
(home-page "https://github.com/PortMidi")
@@ -3098,7 +3131,7 @@ (define-public frescobaldi
(inputs
(list lilypond
poppler
- portmidi
+ portmidi-2
python-ly
python-poppler-qt5
python-pyportmidi
--
2.41.0
M
M
Maxim Cournoyer wrote on 4 Jan 19:00 +0100
Re: [bug#68052] [PATCH 1/4] gnu: python-poppler-qt5: update to 21.3.0
(name . Marco Rimoldi)(address . rimarko@libero.it)(address . 68052@debbugs.gnu.org)
87wmsp0yi3.fsf@gmail.com
Hello,

Marco Rimoldi <rimarko@libero.it> writes:

Toggle quote (2 lines)
> * 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).

Toggle quote (2 lines)
> [build-system]: Change to pyproject, fix previous build failure.

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

Toggle quote (24 lines)
> 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.

Toggle quote (26 lines)
> - (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).

Toggle quote (16 lines)
> + #: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.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 4 Jan 19:00 +0100
control message for bug #68052
(address . control@debbugs.gnu.org)
87v8890yhy.fsf@gmail.com
tags 68052 + moreinfo
quit
M
M
Maxim Cournoyer wrote on 4 Jan 19:02 +0100
Re: [bug#68052] [PATCH 2/4] gnu : python-poppler-qt5: Remove no longer needed patch
(name . Marco Rimoldi)(address . rimarko@libero.it)(address . 68052@debbugs.gnu.org)
87r0ix0yfo.fsf@gmail.com
Hi,

Marco Rimoldi <rimarko@libero.it> writes:

Missing GNU changelog message, e.g.:

Toggle snippet (3 lines)
* gnu/packages/patches/python-poppler-qt5-fix-build.patch: Delete file.

This change should be squashed in the previous commit, as they belong
together.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 4 Jan 19:04 +0100
Re: [bug#68052] [PATCH 3/4] gnu: python-pyportmidi: Update to latest git revision, fixing build fail.
(name . Marco Rimoldi)(address . rimarko@libero.it)(address . 68052@debbugs.gnu.org)
87mstl0ybj.fsf@gmail.com
Hello,

Marco Rimoldi <rimarko@libero.it> writes:

Please write GNU ChangeLog commit messages, as mentioned in info '(guix)
Submitting Patches'. This makes it easy to review the changes and match
if the actual changes match the author's intent.

Toggle quote (66 lines)
> Change-Id: Ibe02edca39731f3f3c9001818665d2da97df9465
> ---
> gnu/packages/music.scm | 52 ++++++++++++++++++------------------------
> 1 file changed, 22 insertions(+), 30 deletions(-)
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 77e952d383..6f1736a276 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -3048,36 +3048,28 @@ (define-public portmidi
> (license license:expat)))
>
> (define-public python-pyportmidi
> - (package
> - (name "python-pyportmidi")
> - (version (package-version portmidi))
> - (source (package-source portmidi))
> - (build-system python-build-system)
> - (arguments
> - `(#:tests? #f ; no tests included
> - #:phases
> - (modify-phases %standard-phases
> - (add-after 'unpack 'enter-dir
> - (lambda _ (chdir "pm_python") #t))
> - (add-after 'enter-dir 'fix-setup.py
> - (lambda _
> - (substitute* "setup.py"
> - ;; Use Python 3 syntax
> - (("print (\".*\")" _ text)
> - (string-append "print(" text ")\n"))
> - ;; TODO.txt and CHANGES.txt don't exist
> - (("CHANGES =.*") "CHANGES = \"\"\n")
> - (("TODO =.*") "TODO = \"\"\n"))
> - #t)))))
> - (inputs
> - (list portmidi alsa-lib))
> - (native-inputs
> - (list python-cython unzip))
> - (home-page "https://portmedia.sourceforge.net/portmidi/")
> - (synopsis "Python bindings to PortMidi")
> - (description
> - "This package provides Python bindings to the PortMidi library.")
> - (license license:expat)))
> + (let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
> + (revision "0"))
> + (package
> + (name "python-pyportmidi")
> + (version (git-version "0.0.7" revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/PortMidi/pm_python.git")
> + (commit commit)))
> + (sha256 (base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
> + (file-name (git-file-name name version))))
> + (build-system python-build-system)
> + (inputs
> + (list portmidi alsa-lib))
> + (native-inputs
> + (list python-cython))
> + (home-page "https://github.com/PortMidi")
> + (synopsis "Python bindings to PortMidi")
> + (description
> + "This package provides Python bindings to the PortMidi library.")
> + (license license:expat))))

Otherwise LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 4 Jan 19:06 +0100
(name . Marco Rimoldi)(address . rimarko@libero.it)(address . 68052@debbugs.gnu.org)
87il490y9h.fsf@gmail.com
Hi again,

Marco Rimoldi <rimarko@libero.it> writes:

[...]

Toggle quote (3 lines)
> + (let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
> + (revision "0"))

Actually, why do we need this latest git version? A explanatory comment
is needed in these case, as we normally ship stable/tagged releases.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 4 Jan 19:07 +0100
Re: [bug#68052] [PATCH 4/4] gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4
(name . Marco Rimoldi)(address . rimarko@libero.it)(address . 68052@debbugs.gnu.org)
87edex0y6f.fsf@gmail.com
Hello Marco,

Marco Rimoldi <rimarko@libero.it> writes:

Toggle quote (4 lines)
> Tested with package Frescobaldi. Other packages dependent on the old
> 217 version still need to be tested and updated so that it can be
> phased out.

Thank you!

[...]

Here also, we'll want a GNU ChangeLog commit message, but otherwise,
LGTM.

Could you send a v2 taking care of my review comments, for this commit
and the earlier ones?

--
Thanks,
Maxim
R
R
rimarko wrote on 16 Jan 01:34 +0100
[PATCH v1 0/3] Collected patches fixing builds of various Frescobaldi dependencies
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
cover.1705365254.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

I applied your suggestions as best as I could Maxim. Looking forward to refine these further if needed.

Thanks for your feedback!

Marco

Marco Rimoldi (3):
gnu: python-poppler-qt5: Update to 21.3.0.
gnu: python-pyportmidi: Update to first working git revision since
project restarted development, fixing build.
gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4.

gnu/local.mk | 1 -
gnu/packages/music.scm | 81 +++++++-----
.../python-poppler-qt5-fix-build.patch | 116 ------------------
gnu/packages/pdf.scm | 50 +++-----
4 files changed, 71 insertions(+), 177 deletions(-)
delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch


base-commit: f6afaf58b0a0b04e5023141c8f56c204f9779e19
--
2.41.0
R
R
rimarko wrote on 16 Jan 01:34 +0100
[PATCH v1 2/3] gnu: python-pyportmidi: Update to first working git revision since project restarted development, fixing build.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
410a4779ff3db386147cc7b7761823d29d0c11cd.1705365254.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

When the PortMidi project moved to GitHub in 2021, changing version numbering scheme, the Python bindings were moved to a separate repository and marked as needing a new maintainer. The chosen revision, dated June 2023, is the first to allow the package to build successfully in the temporary lack of an official new release.

* gnu/packages/music.scm (python-pyportmidi): Source moved, fix build.
[version]: Change to new scheme, jumping from 217 to 0.0.7.
[source]: Change origin from Sourceforge to GitHub.

Change-Id: Ibe02edca39731f3f3c9001818665d2da97df9465
---
gnu/packages/music.scm | 52 ++++++++++++++++++------------------------
1 file changed, 22 insertions(+), 30 deletions(-)

Toggle diff (65 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 77e952d383..28141c11a5 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3048,36 +3048,28 @@ (define-public portmidi
(license license:expat)))
(define-public python-pyportmidi
- (package
- (name "python-pyportmidi")
- (version (package-version portmidi))
- (source (package-source portmidi))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f ; no tests included
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-dir
- (lambda _ (chdir "pm_python") #t))
- (add-after 'enter-dir 'fix-setup.py
- (lambda _
- (substitute* "setup.py"
- ;; Use Python 3 syntax
- (("print (\".*\")" _ text)
- (string-append "print(" text ")\n"))
- ;; TODO.txt and CHANGES.txt don't exist
- (("CHANGES =.*") "CHANGES = \"\"\n")
- (("TODO =.*") "TODO = \"\"\n"))
- #t)))))
- (inputs
- (list portmidi alsa-lib))
- (native-inputs
- (list python-cython unzip))
- (home-page "https://portmedia.sourceforge.net/portmidi/")
- (synopsis "Python bindings to PortMidi")
- (description
- "This package provides Python bindings to the PortMidi library.")
- (license license:expat)))
+ (let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
+ (revision "0"))
+ (package
+ (name "python-pyportmidi")
+ (version (git-version "0.0.7" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PortMidi/pm_python")
+ (commit commit)))
+ (sha256
+ (base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
+ (file-name (git-file-name name version))))
+ (build-system python-build-system)
+ (inputs (list portmidi alsa-lib))
+ (native-inputs (list python-cython))
+ (home-page "https://github.com/PortMidi")
+ (synopsis "Python bindings to PortMidi")
+ (description
+ "This package provides Python bindings to the PortMidi library.")
+ (license license:expat))))
(define-public frescobaldi
(package
--
2.41.0
R
R
rimarko wrote on 16 Jan 01:34 +0100
[PATCH v1 3/3] gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
3f5ce187fa230d83f3b79cc9bf3f091f122b1366.1705365254.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

Tested with package Frescobaldi. Other packages dependent on the old 217 version still need to be tested and updated so that it can be phased out.

* gnu/packages/music.scm (portmidi): Add variant portmidi-2.
[version]: Change to new scheme, jumping from 217 to 2.0.4.
[source]: Change origin from Sourceforge to GitHub.
* gnu/packages/music.scm (python-pyportmidi) [inputs]: Change portmidi to portmidi-2.
* gnu/packages/music.scm (python-pyportmidi) [inputs]: Change portmidi to portmidi-2.

Change-Id: I2530d206e19e885082a95f1aac65348e7a51d4ca
---
gnu/packages/music.scm | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 28141c11a5..2d7d3fdd0a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3047,6 +3047,39 @@ (define-public portmidi
using a system-independent interface.")
(license license:expat)))
+(define-public portmidi-2
+ (package
+ (name "portmidi")
+ (version "2.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PortMidi/portmidi")
+ (commit "b808babecdc5d05205467dab5c1006c5ac0fdfd4")))
+ (sha256
+ (base32 "05a3dfpgbpcg08p8a3acjrrd1qy5hvvray2kz2asygy1vf3mx85s"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ;Tests are interactive and can be found in the
+ #:configure-flags ;pm_tests/ directory of the build tree.
+ (list "-DBUILD_PORTMIDI_TESTS=On")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-version
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("2.0.3")
+ (version))))))))
+ (inputs (list alsa-lib))
+ (native-inputs (list unzip))
+ (home-page "https://github.com/PortMidi/")
+ (synopsis "Library for MIDI I/O")
+ (description
+ "PortMidi is a library supporting real-time input and output of MIDI data
+using a system-independent interface.")
+ (license license:expat)))
+
(define-public python-pyportmidi
(let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
(revision "0"))
@@ -3063,7 +3096,7 @@ (define-public python-pyportmidi
(base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
(file-name (git-file-name name version))))
(build-system python-build-system)
- (inputs (list portmidi alsa-lib))
+ (inputs (list portmidi-2 alsa-lib))
(native-inputs (list python-cython))
(home-page "https://github.com/PortMidi")
(synopsis "Python bindings to PortMidi")
@@ -3098,7 +3131,7 @@ (define-public frescobaldi
(inputs
(list lilypond
poppler
- portmidi
+ portmidi-2
python-ly
python-poppler-qt5
python-pyportmidi
--
2.41.0
R
R
rimarko wrote on 16 Jan 01:34 +0100
[PATCH v1 1/3] gnu: python-poppler-qt5: Update to 21.3.0.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
217a69a61e47a86201ade68e30e463075f879e1c.1705365254.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

* gnu/packages/pdf.scm (python-poppler-qt5): Update to 21.3.0.
[build-system]: Change to pyproject.
[inputs]: Change sip to sip-4.
* gnu/packages/patches/python-poppler-qt5-fix-build.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): De-register said patch.

Change-Id: I30d6e2a3180505091d8072ed452211b0bb3a0178
---
gnu/local.mk | 1 -
.../python-poppler-qt5-fix-build.patch | 116 ------------------
gnu/packages/pdf.scm | 50 +++-----
3 files changed, 18 insertions(+), 149 deletions(-)
delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch

Toggle diff (199 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index d2e2843372..bd0d9b75ce 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1794,7 +1794,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-feedparser-missing-import.patch \
%D%/packages/patches/python-louvain-fix-test.patch \
%D%/packages/patches/python-random2-getrandbits-test.patch \
- %D%/packages/patches/python-poppler-qt5-fix-build.patch \
%D%/packages/patches/python-pyreadstat-link-libiconv.patch \
%D%/packages/patches/python-pypdf-annotate-tests-appropriately.patch \
%D%/packages/patches/python-pytorch2-system-libraries.patch \
diff --git a/gnu/packages/patches/python-poppler-qt5-fix-build.patch b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
deleted file mode 100644
index 099bb86d2f..0000000000
--- a/gnu/packages/patches/python-poppler-qt5-fix-build.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Patch taken from the upstream repository
-https://github.com/frescobaldi/python-poppler-qt5/issues/43
-
-From 92e5962ec3751ab051d0b655fd61afc7a1cf709e Mon Sep 17 00:00:00 2001
-From: Ben Greiner <code@bnavigator.de>
-Date: Thu, 4 Mar 2021 17:02:51 +0100
-Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
- FormFieldChoice::choicesWithExportValues() (#45)
-
----
- types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
-diff --git a/types.sip b/types.sip
-index 239b8c9..81cb283 100644
---- a/types.sip
-+++ b/types.sip
-@@ -331,5 +331,98 @@ template <TYPE>
- };
-
-
-+/**
-+ * Convert QVector< QPair<TYPE, TYPE> >
-+ * from and to a Python list of a 2-item tuple
-+ */
-+
-+template<TYPE>
-+%MappedType QVector< QPair<TYPE, TYPE> >
-+{
-+%TypeHeaderCode
-+#include <qvector.h>
-+#include <qpair.h>
-+%End
-+
-+%ConvertFromTypeCode
-+ // Create the list.
-+ PyObject *l;
-+
-+ if ((l = PyList_New(sipCpp->size())) == NULL)
-+ return NULL;
-+
-+ // Set the list elements.
-+ for (int i = 0; i < sipCpp->size(); ++i)
-+ {
-+ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
-+ PyObject *ptuple = PyTuple_New(2);
-+ PyObject *pfirst;
-+ PyObject *psecond;
-+
-+ TYPE *sfirst = new TYPE(p->first);
-+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 0, pfirst);
-+
-+ TYPE *ssecond = new TYPE(p->second);
-+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ Py_DECREF(pfirst);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 1, psecond);
-+
-+ PyList_SET_ITEM(l, i, ptuple);
-+ }
-+
-+ return l;
-+%End
-+
-+%ConvertToTypeCode
-+ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
-+
-+ // Check the type if that is all that is required.
-+ if (sipIsErr == NULL)
-+ {
-+ if (!PySequence_Check(sipPy))
-+ return 0;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE))
-+ return 0;
-+
-+ return 1;
-+ }
-+
-+
-+ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ {
-+ int state;
-+ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
-+
-+ if (*sipIsErr)
-+ {
-+ sipReleaseType(p, qpair_type, state);
-+ delete qv;
-+ return 0;
-+ }
-+ qv->append(*p);
-+ sipReleaseType(p, qpair_type, state);
-+ }
-+
-+ *sipCppPtr = qv;
-+ return sipGetState(sipTransferObj);
-+%End
-+
-+};
-+
-
- /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index e07f0441e2..c7a08cafa3 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -431,40 +431,26 @@ (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)
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-poppler-qt5" version))
+ (sha256
+ (base32 "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))))))
- (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")
+ `(;; The sipbuild.api 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
+ #:tests? #f))
+ (native-inputs (list pkg-config))
+ (inputs (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.")
--
2.41.0
R
R
rimarko wrote on 16 Jan 18:37 +0100
[PATCH v2 0/3] Collected patches fixing builds of various Frescobaldi dependencies
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
cover.1705426659.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

Just a correction to the commit description re: python-poppler-qt5. The python-sip-4 package was replaced with python-sip to allow build, not the other way around.

Marco

Marco Rimoldi (3):
gnu: python-poppler-qt5: Update to 21.3.0.
gnu: python-pyportmidi: Update to first working git revision since
project restarted development, fixing build.
gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4.

gnu/local.mk | 1 -
gnu/packages/music.scm | 81 +++++++-----
.../python-poppler-qt5-fix-build.patch | 116 ------------------
gnu/packages/pdf.scm | 50 +++-----
4 files changed, 71 insertions(+), 177 deletions(-)
delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch


base-commit: f6afaf58b0a0b04e5023141c8f56c204f9779e19
--
2.41.0
R
R
rimarko wrote on 16 Jan 18:37 +0100
[PATCH v2 1/3] gnu: python-poppler-qt5: Update to 21.3.0.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
785256562197b2f1fdbd67ca21b0ee9e2464b611.1705426659.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

* gnu/packages/pdf.scm (python-poppler-qt5): Update to 21.3.0.
[build-system]: Change to pyproject.
[inputs]: Change SIP to current version variant.
* gnu/packages/patches/python-poppler-qt5-fix-build.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): De-register said patch.

Change-Id: I30d6e2a3180505091d8072ed452211b0bb3a0178
---
gnu/local.mk | 1 -
.../python-poppler-qt5-fix-build.patch | 116 ------------------
gnu/packages/pdf.scm | 50 +++-----
3 files changed, 18 insertions(+), 149 deletions(-)
delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch

Toggle diff (199 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index d2e2843372..bd0d9b75ce 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1794,7 +1794,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-feedparser-missing-import.patch \
%D%/packages/patches/python-louvain-fix-test.patch \
%D%/packages/patches/python-random2-getrandbits-test.patch \
- %D%/packages/patches/python-poppler-qt5-fix-build.patch \
%D%/packages/patches/python-pyreadstat-link-libiconv.patch \
%D%/packages/patches/python-pypdf-annotate-tests-appropriately.patch \
%D%/packages/patches/python-pytorch2-system-libraries.patch \
diff --git a/gnu/packages/patches/python-poppler-qt5-fix-build.patch b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
deleted file mode 100644
index 099bb86d2f..0000000000
--- a/gnu/packages/patches/python-poppler-qt5-fix-build.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Patch taken from the upstream repository
-https://github.com/frescobaldi/python-poppler-qt5/issues/43
-
-From 92e5962ec3751ab051d0b655fd61afc7a1cf709e Mon Sep 17 00:00:00 2001
-From: Ben Greiner <code@bnavigator.de>
-Date: Thu, 4 Mar 2021 17:02:51 +0100
-Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
- FormFieldChoice::choicesWithExportValues() (#45)
-
----
- types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
-diff --git a/types.sip b/types.sip
-index 239b8c9..81cb283 100644
---- a/types.sip
-+++ b/types.sip
-@@ -331,5 +331,98 @@ template <TYPE>
- };
-
-
-+/**
-+ * Convert QVector< QPair<TYPE, TYPE> >
-+ * from and to a Python list of a 2-item tuple
-+ */
-+
-+template<TYPE>
-+%MappedType QVector< QPair<TYPE, TYPE> >
-+{
-+%TypeHeaderCode
-+#include <qvector.h>
-+#include <qpair.h>
-+%End
-+
-+%ConvertFromTypeCode
-+ // Create the list.
-+ PyObject *l;
-+
-+ if ((l = PyList_New(sipCpp->size())) == NULL)
-+ return NULL;
-+
-+ // Set the list elements.
-+ for (int i = 0; i < sipCpp->size(); ++i)
-+ {
-+ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
-+ PyObject *ptuple = PyTuple_New(2);
-+ PyObject *pfirst;
-+ PyObject *psecond;
-+
-+ TYPE *sfirst = new TYPE(p->first);
-+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 0, pfirst);
-+
-+ TYPE *ssecond = new TYPE(p->second);
-+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ Py_DECREF(pfirst);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 1, psecond);
-+
-+ PyList_SET_ITEM(l, i, ptuple);
-+ }
-+
-+ return l;
-+%End
-+
-+%ConvertToTypeCode
-+ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
-+
-+ // Check the type if that is all that is required.
-+ if (sipIsErr == NULL)
-+ {
-+ if (!PySequence_Check(sipPy))
-+ return 0;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE))
-+ return 0;
-+
-+ return 1;
-+ }
-+
-+
-+ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ {
-+ int state;
-+ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
-+
-+ if (*sipIsErr)
-+ {
-+ sipReleaseType(p, qpair_type, state);
-+ delete qv;
-+ return 0;
-+ }
-+ qv->append(*p);
-+ sipReleaseType(p, qpair_type, state);
-+ }
-+
-+ *sipCppPtr = qv;
-+ return sipGetState(sipTransferObj);
-+%End
-+
-+};
-+
-
- /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index e07f0441e2..c7a08cafa3 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -431,40 +431,26 @@ (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)
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-poppler-qt5" version))
+ (sha256
+ (base32 "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))))))
- (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")
+ `(;; The sipbuild.api 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
+ #:tests? #f))
+ (native-inputs (list pkg-config))
+ (inputs (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.")
--
2.41.0
R
R
rimarko wrote on 16 Jan 18:37 +0100
[PATCH v2 2/3] gnu: python-pyportmidi: Update to first working git revision since project restarted development, fixing build.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
3b8c6eb1dfcce617b2dc17f3ae8b66c0f23cfa0b.1705426659.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

When the PortMidi project moved to GitHub in 2021, changing version numbering scheme, the Python bindings were moved to a separate repository and marked as needing a new maintainer. The chosen revision, dated June 2023, is the first to allow the package to build successfully in the temporary lack of an official new release.

* gnu/packages/music.scm (python-pyportmidi): Source moved, fix build.
[version]: Change to new scheme, jumping from 217 to 0.0.7.
[source]: Change origin from Sourceforge to GitHub.

Change-Id: Ibe02edca39731f3f3c9001818665d2da97df9465
---
gnu/packages/music.scm | 52 ++++++++++++++++++------------------------
1 file changed, 22 insertions(+), 30 deletions(-)

Toggle diff (65 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 77e952d383..28141c11a5 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3048,36 +3048,28 @@ (define-public portmidi
(license license:expat)))
(define-public python-pyportmidi
- (package
- (name "python-pyportmidi")
- (version (package-version portmidi))
- (source (package-source portmidi))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f ; no tests included
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-dir
- (lambda _ (chdir "pm_python") #t))
- (add-after 'enter-dir 'fix-setup.py
- (lambda _
- (substitute* "setup.py"
- ;; Use Python 3 syntax
- (("print (\".*\")" _ text)
- (string-append "print(" text ")\n"))
- ;; TODO.txt and CHANGES.txt don't exist
- (("CHANGES =.*") "CHANGES = \"\"\n")
- (("TODO =.*") "TODO = \"\"\n"))
- #t)))))
- (inputs
- (list portmidi alsa-lib))
- (native-inputs
- (list python-cython unzip))
- (home-page "https://portmedia.sourceforge.net/portmidi/")
- (synopsis "Python bindings to PortMidi")
- (description
- "This package provides Python bindings to the PortMidi library.")
- (license license:expat)))
+ (let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
+ (revision "0"))
+ (package
+ (name "python-pyportmidi")
+ (version (git-version "0.0.7" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PortMidi/pm_python")
+ (commit commit)))
+ (sha256
+ (base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
+ (file-name (git-file-name name version))))
+ (build-system python-build-system)
+ (inputs (list portmidi alsa-lib))
+ (native-inputs (list python-cython))
+ (home-page "https://github.com/PortMidi")
+ (synopsis "Python bindings to PortMidi")
+ (description
+ "This package provides Python bindings to the PortMidi library.")
+ (license license:expat))))
(define-public frescobaldi
(package
--
2.41.0
R
R
rimarko wrote on 16 Jan 18:37 +0100
[PATCH v2 3/3] gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
4d0c56504b50394bf8eafda80fc91e8fa5b5ed2b.1705426659.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

Tested with package Frescobaldi. Other packages dependent on the old 217 version still need to be tested and updated so that it can be phased out.

* gnu/packages/music.scm (portmidi): Add variant portmidi-2.
[version]: Change to new scheme, jumping from 217 to 2.0.4.
[source]: Change origin from Sourceforge to GitHub.
* gnu/packages/music.scm (python-pyportmidi) [inputs]: Change portmidi to portmidi-2.
* gnu/packages/music.scm (python-pyportmidi) [inputs]: Change portmidi to portmidi-2.

Change-Id: I2530d206e19e885082a95f1aac65348e7a51d4ca
---
gnu/packages/music.scm | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 28141c11a5..2d7d3fdd0a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3047,6 +3047,39 @@ (define-public portmidi
using a system-independent interface.")
(license license:expat)))
+(define-public portmidi-2
+ (package
+ (name "portmidi")
+ (version "2.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PortMidi/portmidi")
+ (commit "b808babecdc5d05205467dab5c1006c5ac0fdfd4")))
+ (sha256
+ (base32 "05a3dfpgbpcg08p8a3acjrrd1qy5hvvray2kz2asygy1vf3mx85s"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ;Tests are interactive and can be found in the
+ #:configure-flags ;pm_tests/ directory of the build tree.
+ (list "-DBUILD_PORTMIDI_TESTS=On")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-version
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("2.0.3")
+ (version))))))))
+ (inputs (list alsa-lib))
+ (native-inputs (list unzip))
+ (home-page "https://github.com/PortMidi/")
+ (synopsis "Library for MIDI I/O")
+ (description
+ "PortMidi is a library supporting real-time input and output of MIDI data
+using a system-independent interface.")
+ (license license:expat)))
+
(define-public python-pyportmidi
(let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
(revision "0"))
@@ -3063,7 +3096,7 @@ (define-public python-pyportmidi
(base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
(file-name (git-file-name name version))))
(build-system python-build-system)
- (inputs (list portmidi alsa-lib))
+ (inputs (list portmidi-2 alsa-lib))
(native-inputs (list python-cython))
(home-page "https://github.com/PortMidi")
(synopsis "Python bindings to PortMidi")
@@ -3098,7 +3131,7 @@ (define-public frescobaldi
(inputs
(list lilypond
poppler
- portmidi
+ portmidi-2
python-ly
python-poppler-qt5
python-pyportmidi
--
2.41.0
R
R
rimarko wrote on 21 Feb 20:30 +0100
[PATCH v3 2/4] gnu: python-pyportmidi: Update to first working git revision since project restarted development, fixing build.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
806023818f7d264173f4de6fcee448a9b48572fe.1708543835.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

When the PortMidi project moved to GitHub in 2021, changing version numbering scheme, the Python bindings were moved to a separate repository and marked as needing a new maintainer. The chosen revision, dated June 2023, is the first to allow the package to build successfully in the temporary lack of an official new release.

* gnu/packages/music.scm (python-pyportmidi): Source moved, fix build.
[version]: Change to new scheme, jumping from 217 to 0.0.7.
[source]: Change origin from Sourceforge to GitHub.

Change-Id: Ibe02edca39731f3f3c9001818665d2da97df9465
---
gnu/packages/music.scm | 52 ++++++++++++++++++------------------------
1 file changed, 22 insertions(+), 30 deletions(-)

Toggle diff (65 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6b218376b7..8926f93ac8 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3034,36 +3034,28 @@ (define-public portmidi
(license license:expat)))
(define-public python-pyportmidi
- (package
- (name "python-pyportmidi")
- (version (package-version portmidi))
- (source (package-source portmidi))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f ; no tests included
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'enter-dir
- (lambda _ (chdir "pm_python") #t))
- (add-after 'enter-dir 'fix-setup.py
- (lambda _
- (substitute* "setup.py"
- ;; Use Python 3 syntax
- (("print (\".*\")" _ text)
- (string-append "print(" text ")\n"))
- ;; TODO.txt and CHANGES.txt don't exist
- (("CHANGES =.*") "CHANGES = \"\"\n")
- (("TODO =.*") "TODO = \"\"\n"))
- #t)))))
- (inputs
- (list portmidi alsa-lib))
- (native-inputs
- (list python-cython unzip))
- (home-page "https://portmedia.sourceforge.net/portmidi/")
- (synopsis "Python bindings to PortMidi")
- (description
- "This package provides Python bindings to the PortMidi library.")
- (license license:expat)))
+ (let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
+ (revision "0"))
+ (package
+ (name "python-pyportmidi")
+ (version (git-version "0.0.7" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PortMidi/pm_python")
+ (commit commit)))
+ (sha256
+ (base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
+ (file-name (git-file-name name version))))
+ (build-system python-build-system)
+ (inputs (list portmidi alsa-lib))
+ (native-inputs (list python-cython))
+ (home-page "https://github.com/PortMidi")
+ (synopsis "Python bindings to PortMidi")
+ (description
+ "This package provides Python bindings to the PortMidi library.")
+ (license license:expat))))
(define-public frescobaldi
(package
--
2.41.0
R
R
rimarko wrote on 21 Feb 20:30 +0100
[PATCH v3 4/4] gnu: frescobaldi: Make it display icons with qtsvg-5.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
69abfc9674f76ff26b43b5a2e75ab0f721fa3b61.1708543835.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

* gnu/packages/music.scm (frescobaldi)
[origin] <uri> Updated to avoid automatic redirect.
[arguments] <phases> Add 'wrap-executable to export QT_PLUGIN_PATH.
[inputs] Add qtsvg-5, bash-minimal.

Change-Id: I55b3c56d41bd60e4ba4c938109ff41631e211ad2
---
gnu/packages/music.scm | 47 ++++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 20 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index a0be16a44e..63d545e68b 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3098,32 +3098,39 @@ (define-public frescobaldi
(origin
(method url-fetch)
(uri (string-append
- "https://github.com/wbsoft/frescobaldi/releases/download/v"
+ "https://github.com/frescobaldi/frescobaldi/releases/download/v"
version "/frescobaldi-" version ".tar.gz"))
(sha256
(base32 "1n60gfnf6x0l1bac088g9adzx0lskbl9knd4y1ynr3y0zcs0kfcz"))))
(build-system python-build-system)
(arguments
(list
- #:tests? #f ;no tests included
- #:phases
- #~(modify-phases %standard-phases
- (add-before 'build 'generate-translations
- (lambda _
- (invoke "make" "-C" "i18n")))
- (add-before 'build 'generate-metadata
- (lambda _
- (invoke "make" "-C" "linux"))))))
- (inputs
- (list lilypond
- poppler
- portmidi-2
- python-ly
- python-poppler-qt5
- python-pyportmidi
- python-pyqt
- python-sip
- qpageview))
+ #:tests? #f ;no tests included
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'generate-translations
+ (lambda _
+ (invoke "make" "-C" "i18n")))
+ (add-before 'build 'generate-metadata
+ (lambda _
+ (invoke "make" "-C" "linux")))
+ (add-after 'install 'wrap-executable
+ (lambda _
+ ;; Ensure that icons are found at runtime.
+ (wrap-program (string-append #$output
+ "/bin/frescobaldi")
+ `("QT_PLUGIN_PATH" prefix
+ ,(list (getenv "QT_PLUGIN_PATH")))))))))
+ (inputs (list bash-minimal
+ lilypond
+ poppler
+ portmidi-2
+ python-ly
+ python-poppler-qt5
+ python-pyportmidi
+ python-pyqt
+ python-sip
+ qpageview
+ qtsvg-5))
(home-page "https://www.frescobaldi.org/")
(synopsis "LilyPond sheet music text editor")
(description
--
2.41.0
R
R
rimarko wrote on 21 Feb 20:30 +0100
[PATCH v3 3/4] gnu: portmidi: Add variant portmidi-2 updated to release 2.0.4.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
4de47074f515c65252d49116ee5507b98ae6a095.1708543835.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

Tested with package Frescobaldi. Other packages dependent on the old 217 version still need to be tested and updated so that it can be phased out.

* gnu/packages/music.scm (portmidi): Add variant portmidi-2.
[version]: Change to new scheme, jumping from 217 to 2.0.4.
[source]: Change origin from Sourceforge to GitHub.
* gnu/packages/music.scm (python-pyportmidi) [inputs]: Change portmidi to portmidi-2.
* gnu/packages/music.scm (frescobaldi) [inputs]: Change portmidi to portmidi-2.

Change-Id: I2530d206e19e885082a95f1aac65348e7a51d4ca
---
gnu/packages/music.scm | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)

Toggle diff (64 lines)
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 8926f93ac8..a0be16a44e 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3033,6 +3033,39 @@ (define-public portmidi
using a system-independent interface.")
(license license:expat)))
+(define-public portmidi-2
+ (package
+ (name "portmidi")
+ (version "2.0.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/PortMidi/portmidi")
+ (commit "b808babecdc5d05205467dab5c1006c5ac0fdfd4")))
+ (sha256
+ (base32 "05a3dfpgbpcg08p8a3acjrrd1qy5hvvray2kz2asygy1vf3mx85s"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ;Tests are interactive and can be found in the
+ #:configure-flags ;pm_tests/ directory of the build tree.
+ (list "-DBUILD_PORTMIDI_TESTS=On")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-version
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("2.0.3")
+ (version))))))))
+ (inputs (list alsa-lib))
+ (native-inputs (list unzip))
+ (home-page "https://github.com/PortMidi/")
+ (synopsis "Library for MIDI I/O")
+ (description
+ "PortMidi is a library supporting real-time input and output of MIDI data
+using a system-independent interface.")
+ (license license:expat)))
+
(define-public python-pyportmidi
(let ((commit "d9e5ee00b208b09618fa0d4a5bbce3c9c077b386")
(revision "0"))
@@ -3049,7 +3082,7 @@ (define-public python-pyportmidi
(base32 "1jvp9na8d1hw46w9ybhkimbavfb3ysw7hp30cbk6dj40k5y5vgvz"))
(file-name (git-file-name name version))))
(build-system python-build-system)
- (inputs (list portmidi alsa-lib))
+ (inputs (list portmidi-2 alsa-lib))
(native-inputs (list python-cython))
(home-page "https://github.com/PortMidi")
(synopsis "Python bindings to PortMidi")
@@ -3084,7 +3117,7 @@ (define-public frescobaldi
(inputs
(list lilypond
poppler
- portmidi
+ portmidi-2
python-ly
python-poppler-qt5
python-pyportmidi
--
2.41.0
R
R
rimarko wrote on 21 Feb 20:30 +0100
[PATCH v3 1/4] gnu: python-poppler-qt5: Update to 21.3.0.
(address . 68052@debbugs.gnu.org)(name . Marco Rimoldi)(address . rimarko@libero.it)
9b3717fdff5c1a5f20ae57b99f365775790b22c9.1708543835.git.rimarko@libero.it
From: Marco Rimoldi <rimarko@libero.it>

* gnu/packages/pdf.scm (python-poppler-qt5): Update to 21.3.0.
[build-system]: Change to pyproject.
[inputs]: Change SIP to current version variant.
* gnu/packages/patches/python-poppler-qt5-fix-build.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): De-register said patch.

Change-Id: I30d6e2a3180505091d8072ed452211b0bb3a0178
---
gnu/local.mk | 1 -
.../python-poppler-qt5-fix-build.patch | 116 ------------------
gnu/packages/pdf.scm | 50 +++-----
3 files changed, 18 insertions(+), 149 deletions(-)
delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch

Toggle diff (201 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c08b27f94d..631addcb29 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1800,7 +1800,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-feedparser-missing-import.patch \
%D%/packages/patches/python-louvain-fix-test.patch \
%D%/packages/patches/python-random2-getrandbits-test.patch \
- %D%/packages/patches/python-poppler-qt5-fix-build.patch \
%D%/packages/patches/python-pyreadstat-link-libiconv.patch \
%D%/packages/patches/python-pyls-black-41.patch \
%D%/packages/patches/python-pypdf-annotate-tests-appropriately.patch \
diff --git a/gnu/packages/patches/python-poppler-qt5-fix-build.patch b/gnu/packages/patches/python-poppler-qt5-fix-build.patch
deleted file mode 100644
index 099bb86d2f..0000000000
--- a/gnu/packages/patches/python-poppler-qt5-fix-build.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Patch taken from the upstream repository
-https://github.com/frescobaldi/python-poppler-qt5/issues/43
-
-From 92e5962ec3751ab051d0b655fd61afc7a1cf709e Mon Sep 17 00:00:00 2001
-From: Ben Greiner <code@bnavigator.de>
-Date: Thu, 4 Mar 2021 17:02:51 +0100
-Subject: [PATCH] map type QVector< QPair<TYPE, TYPE> > for
- FormFieldChoice::choicesWithExportValues() (#45)
-
----
- types.sip | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
-diff --git a/types.sip b/types.sip
-index 239b8c9..81cb283 100644
---- a/types.sip
-+++ b/types.sip
-@@ -331,5 +331,98 @@ template <TYPE>
- };
-
-
-+/**
-+ * Convert QVector< QPair<TYPE, TYPE> >
-+ * from and to a Python list of a 2-item tuple
-+ */
-+
-+template<TYPE>
-+%MappedType QVector< QPair<TYPE, TYPE> >
-+{
-+%TypeHeaderCode
-+#include <qvector.h>
-+#include <qpair.h>
-+%End
-+
-+%ConvertFromTypeCode
-+ // Create the list.
-+ PyObject *l;
-+
-+ if ((l = PyList_New(sipCpp->size())) == NULL)
-+ return NULL;
-+
-+ // Set the list elements.
-+ for (int i = 0; i < sipCpp->size(); ++i)
-+ {
-+ QPair<TYPE, TYPE>* p = new QPair<TYPE, TYPE>(sipCpp->at(i));
-+ PyObject *ptuple = PyTuple_New(2);
-+ PyObject *pfirst;
-+ PyObject *psecond;
-+
-+ TYPE *sfirst = new TYPE(p->first);
-+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 0, pfirst);
-+
-+ TYPE *ssecond = new TYPE(p->second);
-+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL)
-+ {
-+ Py_DECREF(l);
-+ Py_DECREF(ptuple);
-+ Py_DECREF(pfirst);
-+ return NULL;
-+ }
-+ PyTuple_SET_ITEM(ptuple, 1, psecond);
-+
-+ PyList_SET_ITEM(l, i, ptuple);
-+ }
-+
-+ return l;
-+%End
-+
-+%ConvertToTypeCode
-+ const sipTypeDef* qpair_type = sipFindType("QPair<TYPE, TYPE>");
-+
-+ // Check the type if that is all that is required.
-+ if (sipIsErr == NULL)
-+ {
-+ if (!PySequence_Check(sipPy))
-+ return 0;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE))
-+ return 0;
-+
-+ return 1;
-+ }
-+
-+
-+ QVector< QPair<TYPE, TYPE> > *qv = new QVector< QPair<TYPE, TYPE> >;
-+
-+ for (int i = 0; i < PySequence_Size(sipPy); ++i)
-+ {
-+ int state;
-+ QPair<TYPE, TYPE> * p = reinterpret_cast< QPair<TYPE, TYPE> * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
-+
-+ if (*sipIsErr)
-+ {
-+ sipReleaseType(p, qpair_type, state);
-+ delete qv;
-+ return 0;
-+ }
-+ qv->append(*p);
-+ sipReleaseType(p, qpair_type, state);
-+ }
-+
-+ *sipCppPtr = qv;
-+ return sipGetState(sipTransferObj);
-+%End
-+
-+};
-+
-
- /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 0d796f65bb..9076407740 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -431,40 +431,26 @@ (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)
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-poppler-qt5" version))
+ (sha256
+ (base32 "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))))))
- (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")
+ `(;; The sipbuild.api 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
+ #:tests? #f))
+ (native-inputs (list pkg-config))
+ (inputs (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.")

base-commit: fdbf4192f5eaa7fdb5e6e2e98ada0726c8104824
--
2.41.0
C
C
Christopher Baines wrote on 16 Mar 11:12 +0100
(address . rimarko@libero.it)
87jzm2scum.fsf@cbaines.net
Marco Rimoldi via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (16 lines)
> From: Marco Rimoldi <rimarko@libero.it>
>
> * gnu/packages/pdf.scm (python-poppler-qt5): Update to 21.3.0.
> [build-system]: Change to pyproject.
> [inputs]: Change SIP to current version variant.
> * gnu/packages/patches/python-poppler-qt5-fix-build.patch: Delete file.
> * gnu/local.mk (dist_patch_DATA): De-register said patch.
>
> Change-Id: I30d6e2a3180505091d8072ed452211b0bb3a0178
> ---
> gnu/local.mk | 1 -
> .../python-poppler-qt5-fix-build.patch | 116 ------------------
> gnu/packages/pdf.scm | 50 +++-----
> 3 files changed, 18 insertions(+), 149 deletions(-)
> delete mode 100644 gnu/packages/patches/python-poppler-qt5-fix-build.patch

These patches look good to me, obviously hopefully the situation around
this software will improve but I've pushed this latest series to master
as 00bf07ecccee86da4ced281bd28948c96db284e6 (after tweaking a few of the
commit messages).

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmX1cPFfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfmEA//fVWlj0FwcmI2xft5SI7Be+aDarLGEP4M
KVZ28N87k4wcNqMGc4RImFgcklvOatmNEveNphMBd9Yu1tc2uuzpR3LwuT4gz9WD
FrXBpgs7YjKu3cFXj81npuflosQsueqe7SaVb+VOtIn2etHTa6wI5jMQ+zI1fx/t
q6UbbAwzubsz9zsUYL0qgbAmde3NMegLLeeu5P9yqvFTVWRmlwQBBx5BqRnCGe7S
OlBRsr+gVo7Lk4224udqJWRAYeIxuYHO5ogw5+31QJZ0z1L+bt2IYJ7X/sz+VxYs
2K19Yva/szn7ElvCrZYtCDXR4tvJUmwWUZH7NEnHk4cioFRp9ixY+sJt3gwR/WeJ
uDmdguch+Sui2affQ4yumWDGjjX7rGQPq5vLU4og739Sa8TvqA7DfiwvTXv3kl7q
OFb1rCc7T1DobIxBMGC6fnLnjo77FNRR7+JVk30QguoUuhEsNEVIo3ruwrz40UqM
f91Ou9ikFJHN71EBtKO3WpPjEXtA81C3DgerNG+f6U53PWVjMAdT6cPwbILBQKGC
ucMUwXAeHEXtLqEvZZIahFVh1DY/b5t1fIeklcHFfg5HMqylD2LEPM26AolR5Iiv
wqVhn1cXXTK2D16FXcbeCrKbhgTIu/Y0TsGfS1wCWC3wGX/F9EYVy/nvZq8fitCq
Ui1eQy/QxiI=
=kYgg
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 68052@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68052
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch