guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: gnu: Add python-mediafile.


From: guix-commits
Subject: 01/04: gnu: Add python-mediafile.
Date: Tue, 2 Feb 2021 16:04:53 -0500 (EST)

rekado pushed a commit to branch master
in repository guix.

commit 5058090ed4b6f4a9d09d74d9516295afff75ece5
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Feb 2 21:55:25 2021 +0100

    gnu: Add python-mediafile.
    
    * gnu/packages/music.scm (python-mediafile): New variable.
    * gnu/packages/patches/python-mediafile-wavpack.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                       |  3 +-
 gnu/packages/music.scm                             | 26 ++++++++++
 .../patches/python-mediafile-wavpack.patch         | 57 ++++++++++++++++++++++
 3 files changed, 85 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 49a5925..b9b4b66 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -7,7 +7,7 @@
 # Copyright © 2016, 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
 # Copyright © 2016, 2017 Rene Saavedra <rennes@openmailbox.org>
 # Copyright © 2016 Adonay "adfeno" Felipe Nogueira 
<https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
-# Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus 
<rekado@elephly.net>
 # Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 # Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
 # Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner 
<efraim@flashner.co.il>
@@ -1543,6 +1543,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python-pyfakefs-remove-bad-test.patch   \
   %D%/packages/patches/python-flint-includes.patch             \
   %D%/packages/patches/python-libxml2-utf8.patch               \
+  %D%/packages/patches/python-mediafile-wavpack.patch          \
   %D%/packages/patches/python-memcached-syntax-warnings.patch  \
   %D%/packages/patches/python-mox3-python3.6-compat.patch      \
   %D%/packages/patches/python-testtools.patch                  \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index f8b93ae..4c1681f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3225,6 +3225,32 @@ streams on an individual packet/page level.")
 (define-public python2-mutagen
   (package-with-python2 python-mutagen))
 
+(define-public python-mediafile
+  (package
+    (name "python-mediafile")
+    (version "0.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mediafile" version))
+       (patches (search-patches "python-mediafile-wavpack.patch"))
+       (sha256
+        (base32
+         "0jmsp3f57xj35ayp8b6didk85nxgl3viw34s5px3l5dwgc055yx3"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-mutagen" ,python-mutagen)
+       ("python-six" ,python-six)
+       ("python-tox" ,python-tox)))
+    (home-page "https://github.com/beetbox/mediafile";)
+    (synopsis "Read and write audio file tags")
+    (description
+     "MediaFile is a simple interface to the metadata tags for many audio file
+formats.  It wraps Mutagen, a high-quality library for low-level tag
+manipulation, with a high-level, format-independent interface for a common set
+of tags.")
+    (license license:expat)))
+
 (define-public python-musicbrainzngs
   (package
     (name "python-musicbrainzngs")
diff --git a/gnu/packages/patches/python-mediafile-wavpack.patch 
b/gnu/packages/patches/python-mediafile-wavpack.patch
new file mode 100644
index 0000000..9839fe8
--- /dev/null
+++ b/gnu/packages/patches/python-mediafile-wavpack.patch
@@ -0,0 +1,57 @@
+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@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,
+     }
+ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]