GNU bug report logs - #50309
[PATCH 0/5] New version of beets

Previous Next

Package: guix-patches;

Reported by: Simon Streit <simon <at> netpanic.org>

Date: Tue, 31 Aug 2021 21:33:01 UTC

Severity: normal

Tags: patch

Done: Lars-Dominik Braun <lars <at> 6xq.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50309 in the body.
You can then email your comments to 50309 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Tue, 31 Aug 2021 21:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simon Streit <simon <at> netpanic.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 31 Aug 2021 21:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simon Streit <simon <at> netpanic.org>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/5] New version of beets
Date: Tue, 31 Aug 2021 22:49:29 +0200
Hello!

Here a little collection of patches to update beets.  Beets-bandcamp is
included in this series although it is not a dependency of beets.  I
merely stumbled across it being not up to date while checking version
numbers.

This update of beets has long been waited for.  Hence there was another
package (beets-next) with a more recent checkout so that it would be
possible to have a more recent version than 1.4.9.  With 1.5.0 I believe
that we do not need beets-next anymore.  Thus I removed it.  It was also
possible to remove some patches too.

Now to beets.  Since my skills with packaging are not quite advanced
yet, I did try my best to modify the definition to accommodate the new
version.  Along the way, I noticed -- even with v1.4.9 -- beets would
not find the fpcalc. Fpcalc is part of chromaprint and while this
package is an optional dependency, I put it into propagated-inputs and
solved this issue somehow.

But I'm still not quite sure if the inputs are done in the right way?
The inputs from “guix import pypi beets” look very different from the
package definition that was laid out before.  This suggestion from
import would fail if I pushed it to my local repository and pulled.  I
left it as it is for the time being.

Hope this is acceptable. 


Kind regards,
Simon


Simon Streit (5):
  gnu: python-confuse: Update to 1.5.0.
  gnu: python-pyacoustid: Update to 1.2.1.
  gnu: python-mediafile: Update to 0.7.0.
  gnu: beets-bandcamp: Update to 0.1.4.
  gnu: beets: Update to 1.5.0.

 gnu/packages/mp3.scm                          |   7 +-
 gnu/packages/music.scm                        | 119 ++++++------------
 .../patches/beets-werkzeug-compat.patch       |  18 ---
 .../patches/python-mediafile-wavpack.patch    |  57 ---------
 gnu/packages/python-xyz.scm                   |   7 +-
 5 files changed, 44 insertions(+), 164 deletions(-)
 delete mode 100644 gnu/packages/patches/beets-werkzeug-compat.patch
 delete mode 100644 gnu/packages/patches/python-mediafile-wavpack.patch

--
2.33.0




Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Tue, 31 Aug 2021 21:41:01 GMT) Full text and rfc822 format available.

Message #8 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Simon Streit <simon <at> netpanic.org>
To: 50309 <at> debbugs.gnu.org
Subject: [PATCH 1/5] gnu: python-confuse: Update to 1.5.0.
Date: Sun, 29 Aug 2021 20:51:43 +0200
* gnu/packages/python-xyz.scm (python-confuse): Update to 1.5.0.
---
 gnu/packages/python-xyz.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 59eb473857..b61b585713 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -106,6 +106,7 @@
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte <at> inria.fr>
 ;;; Copyright © 2021 Franck Pérignon <franck.perignon <at> univ-grenoble-alpes.fr>
+;;; Copyright © 2021 Simon Streit <simon <at> netpanic.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25669,20 +25670,20 @@ Qt applications.")
 (define-public python-confuse
   (package
     (name "python-confuse")
-    (version "1.4.0")
+    (version "1.5.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "confuse" version))
        (sha256
         (base32
-         "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
+         "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pathlib" ,python-pathlib)
        ("python-pyyaml" ,python-pyyaml)))
     (home-page "https://github.com/beetbox/confuse")
-    (synopsis "Painless YAML configuration.")
+    (synopsis "Painless YAML configuration")
     (description "Confuse is a configuration library for Python that uses
 YAML.  It takes care of defaults, overrides, type checking, command-line
 integration, human-readable errors, and standard OS-specific locations.")
--
2.33.0




Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Tue, 31 Aug 2021 21:41:01 GMT) Full text and rfc822 format available.

Message #11 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Simon Streit <simon <at> netpanic.org>
To: 50309 <at> debbugs.gnu.org
Subject: [PATCH 2/5] gnu: python-pyacoustid: Update to 1.2.1.
Date: Sun, 29 Aug 2021 20:57:06 +0200
* gnu/packages/mp3.scm (python-pyacoustid): Update to 1.2.1.
---
 gnu/packages/mp3.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 9de9055e51..2ad19e9e10 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
+;;; Copyright © 2021 Simon Streit <simon <at> netpanic.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -645,19 +646,19 @@ FFmpeg, etc.")
 (define-public python-pyacoustid
   (package
     (name "python-pyacoustid")
-    (version "1.1.7")
+    (version "1.2.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pyacoustid" version))
        (sha256
         (base32
-         "1zan6c22ca6sjy0g9ajwjp6mkzw7jv8r3n7jzska09a6x254lf87"))))
+         "115svv5mkz6lq4rzwpjgs61psprmbl7p0bwdfl4dbsn5zcljjaz6"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-audioread" ,python-audioread)
        ("python-requests" ,python-requests)))
-    (home-page "https://github.com/sampsyo/pyacoustid")
+    (home-page "https://github.com/beetbox/pyacoustid")
     (synopsis "Bindings for Chromaprint acoustic fingerprinting")
     (description
      "This package provides bindings for the Chromaprint acoustic
-- 
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Tue, 31 Aug 2021 21:42:02 GMT) Full text and rfc822 format available.

Message #14 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Simon Streit <simon <at> netpanic.org>
To: 50309 <at> debbugs.gnu.org
Subject: [PATCH 3/5] gnu: python-mediafile: Update to 0.7.0.
Date: Sun, 29 Aug 2021 21:05:01 +0200
Remove patch. It is now included in upstream release.

* gnu/packages/music.scm (python-mediafile): Update to 0.7.0.
* gnu/packages/patches/python-mediafile-wavpack.patch: Delete patch.
---
 gnu/packages/music.scm                        |  7 ++-
 .../patches/python-mediafile-wavpack.patch    | 57 -------------------
 2 files changed, 4 insertions(+), 60 deletions(-)
 delete mode 100644 gnu/packages/patches/python-mediafile-wavpack.patch

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b95be813dc..c417e22804 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2021 Rovanion Luckey <rovanion.luckey <at> gmail.com>
 ;;; Copyright © 2021 Justin Veilleux <terramorpha <at> cock.li>
 ;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
+;;; Copyright © 2021 Simon Streit <simon <at> netpanic.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3604,15 +3605,15 @@ streams on an individual packet/page level.")
 (define-public python-mediafile
   (package
     (name "python-mediafile")
-    (version "0.6.0")
+    (version "0.7.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "mediafile" version))
-       (patches (search-patches "python-mediafile-wavpack.patch"))
+       ;; (patches (search-patches "python-mediafile-wavpack.patch"))
        (sha256
         (base32
-         "0jmsp3f57xj35ayp8b6didk85nxgl3viw34s5px3l5dwgc055yx3"))))
+         "0fvxhiypf5qp1m9gzd0bik5wnfcm8sd7xivd02d6d0ml85qxwcwg"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-mutagen" ,python-mutagen)
diff --git a/gnu/packages/patches/python-mediafile-wavpack.patch b/gnu/packages/patches/python-mediafile-wavpack.patch
deleted file mode 100644
index 9839fe87b5..0000000000
--- a/gnu/packages/patches/python-mediafile-wavpack.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-This patch has already been applied upstream, but is not included in the
-current release 0.6.0.
-
-From d2fc3b59f77c515b02dfe7ad936f89264375d2b4 Mon Sep 17 00:00:00 2001
-From: Adrian Sampson <adrian <at> radbox.org>
-Date: Wed, 29 Jul 2020 19:42:57 -0400
-Subject: [PATCH] Fix test for WavPack bitrate
-
-Fixes #34.
----
- docs/index.rst         | 5 +++++
- mediafile.py           | 2 +-
- test/test_mediafile.py | 2 +-
- 3 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/docs/index.rst b/docs/index.rst
-index 7b622df..1465405 100644
---- a/docs/index.rst
-+++ b/docs/index.rst
-@@ -100,6 +100,11 @@ Internals
- Changelog
- ---------
- 
-+v0.7.0
-+''''''
-+
-+- Mutagen 1.45.0 or later is now required.
-+
- v0.6.0
- ''''''
- 
-diff --git a/mediafile.py b/mediafile.py
-index 23fadaf..9e9d063 100644
---- a/mediafile.py
-+++ b/mediafile.py
-@@ -56,7 +56,7 @@
- import six
- 
- 
--__version__ = '0.6.0'
-+__version__ = '0.7.0'
- __all__ = ['UnreadableFileError', 'FileTypeError', 'MediaFile']
- 
- log = logging.getLogger(__name__)
-diff --git a/test/test_mediafile.py b/test/test_mediafile.py
-index e9e1850..7f17f44 100644
---- a/test/test_mediafile.py
-+++ b/test/test_mediafile.py
-@@ -907,7 +907,7 @@ class WavpackTest(ReadWriteTestBase, unittest.TestCase):
-         'bitrate': 109312,
-         'format': u'WavPack',
-         'samplerate': 44100,
--        'bitdepth': 0,
-+        'bitdepth': 16,
-         'channels': 1,
-     }
- 
-- 
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Tue, 31 Aug 2021 21:42:02 GMT) Full text and rfc822 format available.

Message #17 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Simon Streit <simon <at> netpanic.org>
To: 50309 <at> debbugs.gnu.org
Subject: [PATCH 4/5] gnu: beets-bandcamp: Update to 0.1.4.
Date: Sun, 29 Aug 2021 22:44:25 +0200
* gnu/packages/music.scm (beets-bandcamp): Update to 0.1.4.
---
 gnu/packages/music.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index c417e22804..63c6ac7d19 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3919,13 +3919,13 @@ websites such as Libre.fm.")
 (define-public beets-bandcamp
   (package
     (name "beets-bandcamp")
-    (version "0.1.3")
+    (version "0.1.4")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "beets-bandcamp" version))
               (sha256
                (base32
-                "04awg0zdhhg5h510fc1p3qkvr2l1qm6nf85hlr9z8im8a7xlka0i"))))
+                "0dwbdkrb9c0ppzm5s78h47ndpr88cw1k0z8fgfhkl706wazx2ddg"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f))          ; there are no tests
     (propagated-inputs
--
2.33.0




Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Tue, 31 Aug 2021 21:43:02 GMT) Full text and rfc822 format available.

Message #20 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Simon Streit <simon <at> netpanic.org>
To: 50309 <at> debbugs.gnu.org
Subject: [PATCH 5/5] gnu: beets: Update to 1.5.0.
Date: Tue, 31 Aug 2021 22:11:51 +0200
* gnu/packages/music.scm (beets): Update to 1.5.0.
* gnu/packages/music.scm (beets-next): Delete variable.
* gnu/packages/patches/beets-werkzeug-compat.patch: Delete patch.
---
 gnu/packages/music.scm                        | 108 +++++-------------
 .../patches/beets-werkzeug-compat.patch       |  18 ---
 2 files changed, 30 insertions(+), 96 deletions(-)
 delete mode 100644 gnu/packages/patches/beets-werkzeug-compat.patch

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 63c6ac7d19..8158a40e49 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3788,34 +3788,32 @@ websites such as Libre.fm.")
 (define-public beets
   (package
     (name "beets")
-    (version "1.4.9")
+    (version "1.5.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "beets" version))
-              (patches (search-patches "beets-werkzeug-compat.patch"))
               (sha256
                (base32
-                "0m40rjimvfgy1dv04p8f8d5dvi2855v4ix99a9xr900cmcn476yj"))))
+                "0arl4nc3y8iwa331hf6ggai19y8ns9pl03g5d6ac857wq2x7nzw8"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         ;; Reported upstream: <https://github.com/beetbox/beets/issues/3771>.
-         ;; Disable the faulty test as the fix is unclear.
+         ;; Test fails.  Reported upstream:
+         ;; https://github.com/beetbox/beets/issues/4037.
          (add-after 'unpack 'disable-failing-tests
            (lambda _
-             (substitute* "test/test_mediafile.py"
-               (("def test_read_audio_properties") "def _test_read_audio_properties"))
+             (substitute* "test/test_zero.py"
+               (("def test_album_art") "def _test_album_art"))
              #t))
          (add-after 'unpack 'set-HOME
            (lambda _
              (setenv "HOME" (string-append (getcwd) "/tmp"))
              #t))
          (replace 'check
-           (lambda _
-             (invoke "nosetests" "-v")))
-         ;; Wrap the executable, so it can find python-gi (aka pygobject) and
-         ;; gstreamer plugins.
+           (lambda _ (invoke "nosetests" "-v")))
+         ;; Wrap the executable, so it can find python-gi (aka
+         ;; pygobject) and gstreamer plugins.
          (add-after 'wrap 'wrap-typelib
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((prog (string-append (assoc-ref outputs "out")
@@ -3826,9 +3824,14 @@ websites such as Libre.fm.")
                  `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,plugins))
                  `("GI_TYPELIB_PATH" ":" prefix (,types)))
                #t))))))
+    (propagated-inputs
+     `(("chromaprint" ,chromaprint)))
     (native-inputs
-     `(("python-beautifulsoup4" ,python-beautifulsoup4)
+     `(("gobject-introspection" ,gobject-introspection)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-confuse" ,python-confuse)
        ("python-flask" ,python-flask)
+       ("python-mediafile" ,python-mediafile)
        ("python-mock" ,python-mock)
        ("python-mpd2" ,python-mpd2)
        ("python-nose" ,python-nose)
@@ -3839,83 +3842,32 @@ websites such as Libre.fm.")
        ("python-responses" ,python-responses)))
     ;; TODO: Install optional plugins and dependencies.
     (inputs
-     `(("python-discogs-client" ,python-discogs-client)
+     `(("bash-minimal" ,bash-minimal)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gstreamer" ,gstreamer)
+       ("opusfile" ,opusfile)
+       ("python-discogs-client" ,python-discogs-client)
        ("python-jellyfish" ,python-jellyfish)
        ("python-munkres" ,python-munkres)
        ("python-musicbrainzngs" ,python-musicbrainzngs)
        ("python-mutagen" ,python-mutagen)
        ("python-pyacoustid" ,python-pyacoustid)
-       ("python-pyyaml" ,python-pyyaml)
-       ("python-unidecode" ,python-unidecode)
        ;; For plugin replaygain.
        ("python-pygobject" ,python-pygobject)
-       ("gobject-introspection" ,gobject-introspection)
-       ("gst-plugins-base" ,gst-plugins-base)
-       ("gst-plugins-good" ,gst-plugins-good)
-       ("gstreamer" ,gstreamer)))
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-reflink" ,python-reflink)
+       ("python-requests-oauthlib" ,python-requests-oauthlib)
+       ("python-unidecode" ,python-unidecode)))
     (home-page "https://beets.io")
     (synopsis "Music organizer")
-    (description "The purpose of beets is to get your music collection right
-    once and for all.  It catalogs your collection, automatically improving its
-    metadata as it goes using the MusicBrainz database.  Then it provides a variety
-    of tools for manipulating and accessing your music.")
+    (description "The purpose of beets is to get your music collection
+right once and for all.  It catalogs your collection, automatically
+improving its metadata as it goes using the MusicBrainz database.
+Then it provides a variety of tools for manipulating and accessing
+your music.")
     (license license:expat)))
 
-(define-public beets-next
-  (let ((commit "04ea754d00e2873ae9aa2d9e07c5cefd790eaee2")
-        (revision "1"))
-    (package
-      (inherit beets)
-      (name "beets-next")
-      (version (git-version (package-version beets) revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/beetbox/beets")
-                      (commit commit)))
-                (file-name (git-file-name "beets" version))
-                (sha256
-                 (base32
-                  "092a9sss2shhcjmpgbwvscv8brpm5970i5hddkhi81xcff3bg1h4"))))
-      (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           ;; XXX: unclear why this fails
-           (add-after 'unpack 'disable-failing-tests
-             (lambda _
-               (substitute* "test/test_zero.py"
-                 (("def test_album_art") "def _test_album_art"))
-               #t))
-           (add-after 'unpack 'set-HOME
-             (lambda _
-               (setenv "HOME" (string-append (getcwd) "/tmp"))
-               #t))
-           (replace 'check
-             (lambda _
-               ;; Resources must be writable.
-               (for-each make-file-writable
-                         (find-files "test/rsrc" "."))
-               (invoke "nosetests" "-v")))
-           ;; Wrap the executable, so it can find python-gi (aka pygobject) and
-           ;; gstreamer plugins.
-           (add-after 'wrap 'wrap-typelib
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((prog (string-append (assoc-ref outputs "out")
-                                          "/bin/beet"))
-                     (plugins (getenv "GST_PLUGIN_SYSTEM_PATH"))
-                     (types (getenv "GI_TYPELIB_PATH")))
-                 (wrap-program prog
-                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,plugins))
-                   `("GI_TYPELIB_PATH" ":" prefix (,types)))
-                 #t))))))
-      (inputs
-       `(("python-confuse" ,python-confuse)
-         ("python-mediafile" ,python-mediafile)
-         ("python-reflink" ,python-reflink)
-         ("python-requests-oauthlib" ,python-requests-oauthlib)
-         ("opusfile" ,opusfile)
-         ,@(package-inputs beets))))))
-
 (define-public beets-bandcamp
   (package
     (name "beets-bandcamp")
diff --git a/gnu/packages/patches/beets-werkzeug-compat.patch b/gnu/packages/patches/beets-werkzeug-compat.patch
deleted file mode 100644
index 1a91c3a3f9..0000000000
--- a/gnu/packages/patches/beets-werkzeug-compat.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Be compatible with python-werkzeug 1.0.0.
-
-Taken from upstream:
-https://github.com/beetbox/beets/commit/d43d54e21cde97f57f19486925ab56b419254cc8
-
-diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py
-index f53fb3a954..21ff5d94ed 100644
---- a/beetsplug/web/__init__.py
-+++ b/beetsplug/web/__init__.py
-@@ -169,7 +169,7 @@ def to_python(self, value):
-         return ids
- 
-     def to_url(self, value):
--        return ','.join(value)
-+        return ','.join(str(v) for v in value)
- 
- 
- class QueryConverter(PathConverter):
-- 
2.33.0





Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Tue, 31 Aug 2021 21:49:02 GMT) Full text and rfc822 format available.

Message #23 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Simon Streit <simon <at> netpanic.org>, 50309 <at> debbugs.gnu.org
Subject: Re: [bug#50309] [PATCH 0/5] New version of beets
Date: Tue, 31 Aug 2021 23:48:25 +0200
[Message part 1 (text/plain, inline)]
Simon Streit schreef op di 31-08-2021 om 22:49 [+0200]:

> Now to beets. [...]
> Along the way, I noticed -- even with v1.4.9 -- beets would
> not find the fpcalc. Fpcalc is part of chromaprint and while this
> package is an optional dependency, I put it into propagated-inputs and
> solved this issue somehow.

beets is probably searching for 'fpcalc' in $PATH, instead of using a string
like /gnu/store/.../bin/fpcalc.  This can usually be resolved with substitute*,
to turn something like 'system("fpcalc --stuff")' into
'system("/gnu/store/.../bin/fpcalc --stuff")' (that's for C code, the python
equivalent might be a little different).

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Wed, 01 Sep 2021 07:23:02 GMT) Full text and rfc822 format available.

Message #26 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Simon Streit <simon <at> netpanic.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 50309 <at> debbugs.gnu.org
Subject: Re: [bug#50309] [PATCH 0/5] New version of beets
Date: Wed, 01 Sep 2021 09:22:40 +0200
Hi Maxime!

Maxime Devos <maximedevos <at> telenet.be> writes:
> Simon Streit schreef op di 31-08-2021 om 22:49 [+0200]:
>> Along the way, I noticed -- even with v1.4.9 -- beets would
>> not find the fpcalc. Fpcalc is part of chromaprint and while this
>> package is an optional dependency, I put it into propagated-inputs and
>> solved this issue somehow.
>
> beets is probably searching for 'fpcalc' in $PATH, instead of using a string
> like /gnu/store/.../bin/fpcalc.  This can usually be resolved with substitute*,
> to turn something like 'system("fpcalc --stuff")' into
> 'system("/gnu/store/.../bin/fpcalc --stuff")' (that's for C code, the python
> equivalent might be a little different).

Thanks for pointing this out.  I modified it and placed a wrapper so
that beets can find chromaprint.




### Begin Patch ###


gnu: beets: Update to 1.5.0.

Remove beets-next, and remove patch.

* gnu/packages/music.scm (beets): Update to 1.5.0.
* gnu/packages/music.scm (beets-next): Delete variable.
* gnu/packages/patches/beets-werkzeug-compat.patch: Delete patch.
---
 gnu/packages/music.scm                        | 120 ++++++------------
 .../patches/beets-werkzeug-compat.patch       |  18 ---
 2 files changed, 42 insertions(+), 96 deletions(-)
 delete mode 100644 gnu/packages/patches/beets-werkzeug-compat.patch

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 63c6ac7d19..51e760e866 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3788,34 +3788,45 @@ websites such as Libre.fm.")
 (define-public beets
   (package
     (name "beets")
-    (version "1.4.9")
+    (version "1.5.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "beets" version))
-              (patches (search-patches "beets-werkzeug-compat.patch"))
               (sha256
                (base32
-                "0m40rjimvfgy1dv04p8f8d5dvi2855v4ix99a9xr900cmcn476yj"))))
+                "0arl4nc3y8iwa331hf6ggai19y8ns9pl03g5d6ac857wq2x7nzw8"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         ;; Reported upstream: <https://github.com/beetbox/beets/issues/3771>.
-         ;; Disable the faulty test as the fix is unclear.
+         ;; Test fails.  Reported upstream:
+         ;; https://github.com/beetbox/beets/issues/4037.
          (add-after 'unpack 'disable-failing-tests
            (lambda _
-             (substitute* "test/test_mediafile.py"
-               (("def test_read_audio_properties") "def _test_read_audio_properties"))
+             (substitute* "test/test_zero.py"
+               (("def test_album_art") "def _test_album_art"))
              #t))
          (add-after 'unpack 'set-HOME
            (lambda _
              (setenv "HOME" (string-append (getcwd) "/tmp"))
              #t))
          (replace 'check
-           (lambda _
-             (invoke "nosetests" "-v")))
-         ;; Wrap the executable, so it can find python-gi (aka pygobject) and
-         ;; gstreamer plugins.
+           (lambda _ (invoke "nosetests" "-v")))
+         ;; Wrap the executable, so it can find chromaprint (fpcalc).
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (chromaprint (assoc-ref inputs "chromaprint")))
+               (wrap-program (string-append out "/bin/beet")
+                 `("XDG_DATA_DIRS" ":" prefix (,out))
+                 `("PATH" ":" prefix
+                   ,(map (lambda (dir)
+                           (string-append dir "/bin:"
+                                          dir "/sbin"))
+                         (list chromaprint))))
+               #t)))
+         ;; Wrap the executable, so it can find python-gi (aka
+         ;; pygobject) and gstreamer plugins.
          (add-after 'wrap 'wrap-typelib
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((prog (string-append (assoc-ref outputs "out")
@@ -3827,8 +3838,11 @@ websites such as Libre.fm.")
                  `("GI_TYPELIB_PATH" ":" prefix (,types)))
                #t))))))
     (native-inputs
-     `(("python-beautifulsoup4" ,python-beautifulsoup4)
+     `(("gobject-introspection" ,gobject-introspection)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-confuse" ,python-confuse)
        ("python-flask" ,python-flask)
+       ("python-mediafile" ,python-mediafile)
        ("python-mock" ,python-mock)
        ("python-mpd2" ,python-mpd2)
        ("python-nose" ,python-nose)
@@ -3839,83 +3853,33 @@ websites such as Libre.fm.")
        ("python-responses" ,python-responses)))
     ;; TODO: Install optional plugins and dependencies.
     (inputs
-     `(("python-discogs-client" ,python-discogs-client)
+     `(("bash-minimal" ,bash-minimal)
+       ("chromaprint" ,chromaprint)
+       ("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gstreamer" ,gstreamer)
+       ("opusfile" ,opusfile)
+       ("python-discogs-client" ,python-discogs-client)
        ("python-jellyfish" ,python-jellyfish)
        ("python-munkres" ,python-munkres)
        ("python-musicbrainzngs" ,python-musicbrainzngs)
        ("python-mutagen" ,python-mutagen)
        ("python-pyacoustid" ,python-pyacoustid)
-       ("python-pyyaml" ,python-pyyaml)
-       ("python-unidecode" ,python-unidecode)
        ;; For plugin replaygain.
        ("python-pygobject" ,python-pygobject)
-       ("gobject-introspection" ,gobject-introspection)
-       ("gst-plugins-base" ,gst-plugins-base)
-       ("gst-plugins-good" ,gst-plugins-good)
-       ("gstreamer" ,gstreamer)))
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-reflink" ,python-reflink)
+       ("python-requests-oauthlib" ,python-requests-oauthlib)
+       ("python-unidecode" ,python-unidecode)))
     (home-page "https://beets.io")
     (synopsis "Music organizer")
-    (description "The purpose of beets is to get your music collection right
-    once and for all.  It catalogs your collection, automatically improving its
-    metadata as it goes using the MusicBrainz database.  Then it provides a variety
-    of tools for manipulating and accessing your music.")
+    (description "The purpose of beets is to get your music collection
+right once and for all.  It catalogs your collection, automatically
+improving its metadata as it goes using the MusicBrainz database.
+Then it provides a variety of tools for manipulating and accessing
+your music.")
     (license license:expat)))
 
-(define-public beets-next
-  (let ((commit "04ea754d00e2873ae9aa2d9e07c5cefd790eaee2")
-        (revision "1"))
-    (package
-      (inherit beets)
-      (name "beets-next")
-      (version (git-version (package-version beets) revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/beetbox/beets")
-                      (commit commit)))
-                (file-name (git-file-name "beets" version))
-                (sha256
-                 (base32
-                  "092a9sss2shhcjmpgbwvscv8brpm5970i5hddkhi81xcff3bg1h4"))))
-      (arguments
-       `(#:phases
-         (modify-phases %standard-phases
-           ;; XXX: unclear why this fails
-           (add-after 'unpack 'disable-failing-tests
-             (lambda _
-               (substitute* "test/test_zero.py"
-                 (("def test_album_art") "def _test_album_art"))
-               #t))
-           (add-after 'unpack 'set-HOME
-             (lambda _
-               (setenv "HOME" (string-append (getcwd) "/tmp"))
-               #t))
-           (replace 'check
-             (lambda _
-               ;; Resources must be writable.
-               (for-each make-file-writable
-                         (find-files "test/rsrc" "."))
-               (invoke "nosetests" "-v")))
-           ;; Wrap the executable, so it can find python-gi (aka pygobject) and
-           ;; gstreamer plugins.
-           (add-after 'wrap 'wrap-typelib
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((prog (string-append (assoc-ref outputs "out")
-                                          "/bin/beet"))
-                     (plugins (getenv "GST_PLUGIN_SYSTEM_PATH"))
-                     (types (getenv "GI_TYPELIB_PATH")))
-                 (wrap-program prog
-                   `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,plugins))
-                   `("GI_TYPELIB_PATH" ":" prefix (,types)))
-                 #t))))))
-      (inputs
-       `(("python-confuse" ,python-confuse)
-         ("python-mediafile" ,python-mediafile)
-         ("python-reflink" ,python-reflink)
-         ("python-requests-oauthlib" ,python-requests-oauthlib)
-         ("opusfile" ,opusfile)
-         ,@(package-inputs beets))))))
-
 (define-public beets-bandcamp
   (package
     (name "beets-bandcamp")
diff --git a/gnu/packages/patches/beets-werkzeug-compat.patch b/gnu/packages/patches/beets-werkzeug-compat.patch
deleted file mode 100644
index 1a91c3a3f9..0000000000
--- a/gnu/packages/patches/beets-werkzeug-compat.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Be compatible with python-werkzeug 1.0.0.
-
-Taken from upstream:
-https://github.com/beetbox/beets/commit/d43d54e21cde97f57f19486925ab56b419254cc8
-
-diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py
-index f53fb3a954..21ff5d94ed 100644
---- a/beetsplug/web/__init__.py
-+++ b/beetsplug/web/__init__.py
-@@ -169,7 +169,7 @@ def to_python(self, value):
-         return ids
- 
-     def to_url(self, value):
--        return ','.join(value)
-+        return ','.join(str(v) for v in value)
- 
- 
- class QueryConverter(PathConverter):
-- 
2.33.0







Information forwarded to guix-patches <at> gnu.org:
bug#50309; Package guix-patches. (Thu, 02 Sep 2021 07:59:01 GMT) Full text and rfc822 format available.

Message #29 received at 50309 <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Simon Streit <simon <at> netpanic.org>
Cc: 50309 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: [bug#50309] [PATCH 0/5] New version of beets
Date: Thu, 2 Sep 2021 09:58:31 +0200
Hi Simon,

> Thanks for pointing this out.  I modified it and placed a wrapper so
> that beets can find chromaprint.
this is not a proper solution unfortunately, because beets itself is not
looking for fpcalc, but the package python-pyacoustid. I’m currently
checking your patchset and upgrading beets, but some of beets’
dependencies are in a bad shape (like python-pyacoustid) and need more
than just version bumps. I’ll fix these and push everything when
I’m done.

Cheers,
Lars





Reply sent to Lars-Dominik Braun <lars <at> 6xq.net>:
You have taken responsibility. (Sat, 04 Sep 2021 13:11:01 GMT) Full text and rfc822 format available.

Notification sent to Simon Streit <simon <at> netpanic.org>:
bug acknowledged by developer. (Sat, 04 Sep 2021 13:11:02 GMT) Full text and rfc822 format available.

Message #34 received at 50309-done <at> debbugs.gnu.org (full text, mbox):

From: Lars-Dominik Braun <lars <at> 6xq.net>
To: Simon Streit <simon <at> netpanic.org>
Cc: 50309-done <at> debbugs.gnu.org
Subject: Re: [bug#50309] [PATCH 0/5] New version of beets
Date: Sat, 4 Sep 2021 15:10:08 +0200
Hi,

I pushed pushed this patch set with modifications and additions as
8ceb7651c2aff73644a49c1d72fe8b63948f0240 and following.

Cheers,
Lars





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 03 Oct 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 198 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.