Accepting request 720014 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/720014 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-audioread?expand=0&rev=6
This commit is contained in:
commit
9acff2ce60
@ -1,70 +0,0 @@
|
|||||||
From 0abbf93a0b245ba28566bd0ca47da9dfa8d266d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sam Thursfield <sam@afuera.me.uk>
|
|
||||||
Date: Wed, 26 Dec 2018 00:28:04 +0000
|
|
||||||
Subject: [PATCH] maddec: Ensure that the audio blocks are of type bytes()
|
|
||||||
|
|
||||||
The audio blocks should be bytes() to be consistent with the other
|
|
||||||
decoders.
|
|
||||||
|
|
||||||
This is required for the pyacoustid and chromaprint libraries, and fixes
|
|
||||||
the following backtrace in Beets when using the 'chroma' plugin:
|
|
||||||
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/usr/bin/beet", line 11, in <module>
|
|
||||||
load_entry_point('beets==1.4.6', 'console_scripts', 'beet')()
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1256, in main
|
|
||||||
_raw_main(args)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1243, in _raw_main
|
|
||||||
subcommand.func(lib, suboptions, subargs)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/ui/commands.py", line 937, in import_func
|
|
||||||
import_files(lib, paths, query)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/ui/commands.py", line 914, in import_files
|
|
||||||
session.run()
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/importer.py", line 327, in run
|
|
||||||
pl.run_parallel(QUEUE_SIZE)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 445, in run_parallel
|
|
||||||
six.reraise(exc_info[0], exc_info[1], exc_info[2])
|
|
||||||
File "/usr/lib/python3.6/site-packages/six.py", line 693, in reraise
|
|
||||||
raise value
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 312, in run
|
|
||||||
out = self.coro.send(msg)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 194, in coro
|
|
||||||
func(*(args + (task,)))
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/importer.py", line 1339, in lookup_candidates
|
|
||||||
plugins.send('import_task_start', session=session, task=task)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 452, in send
|
|
||||||
result = handler(**arguments)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 124, in wrapper
|
|
||||||
return func(*args, **kwargs)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 143, in fingerprint_task
|
|
||||||
return fingerprint_task(self._log, task, session)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 212, in fingerprint_task
|
|
||||||
acoustid_match(log, item.path)
|
|
||||||
File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 65, in acoustid_match
|
|
||||||
duration, fp = acoustid.fingerprint_file(util.syspath(path))
|
|
||||||
File "/usr/lib/python3.6/site-packages/acoustid.py", line 321, in fingerprint_file
|
|
||||||
return _fingerprint_file_audioread(path, maxlength)
|
|
||||||
File "/usr/lib/python3.6/site-packages/acoustid.py", line 264, in _fingerprint_file_audioread
|
|
||||||
fp = fingerprint(f.samplerate, f.channels, iter(f), maxlength)
|
|
||||||
File "/usr/lib/python3.6/site-packages/acoustid.py", line 206, in fingerprint
|
|
||||||
fper.feed(block)
|
|
||||||
File "/usr/lib/python3.6/site-packages/chromaprint.py", line 126, in feed
|
|
||||||
self._ctx, data, len(data) // 2
|
|
||||||
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
|
|
||||||
---
|
|
||||||
audioread/maddec.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/audioread/maddec.py b/audioread/maddec.py
|
|
||||||
index 8dd7aaa..3a2a694 100644
|
|
||||||
--- a/audioread/maddec.py
|
|
||||||
+++ b/audioread/maddec.py
|
|
||||||
@@ -43,7 +43,7 @@ def read_blocks(self, block_size=4096):
|
|
||||||
out = self.mf.read(block_size)
|
|
||||||
if not out:
|
|
||||||
break
|
|
||||||
- yield out
|
|
||||||
+ yield bytes(out)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def samplerate(self):
|
|
19
LICENSE
19
LICENSE
@ -1,19 +0,0 @@
|
|||||||
Copyright (c) 2011-2018 Adrian Sampson
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
||||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
||||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
|
||||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b0b9270c20833a75ce0d167fb2fdad52ddcd8e8f300be8afad3ac9715850bc50
|
|
||||||
size 15838
|
|
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 31 08:47:01 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 2.1.8
|
||||||
|
* Fix an unhandled ``OSError`` when FFmpeg is not installed.
|
||||||
|
* Properly close some filehandles in the FFmpeg backend (thanks to
|
||||||
|
@RyanMarcus and @ssssam).
|
||||||
|
* The maddec backend now always produces bytes objects, like the other
|
||||||
|
backends (thanks to @ssssam).
|
||||||
|
* Resolve an audio data memory leak in the GStreamer backend (thanks again to
|
||||||
|
@ssssam).
|
||||||
|
* You can now optionally specify which specific backends ``audio_open`` should
|
||||||
|
try (thanks once again to @ssssam).
|
||||||
|
- deleted patches
|
||||||
|
- 0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch (upstreamed)
|
||||||
|
- deleted sources
|
||||||
|
- LICENSE (not needed)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 25 15:06:33 UTC 2019 - Antonio Larrosa <alarrosa@suse.com>
|
Mon Feb 25 15:06:33 UTC 2019 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
@ -18,18 +18,18 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-audioread
|
Name: python-audioread
|
||||||
Version: 2.1.6
|
Version: 2.1.8
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Wrapper for audio decoding via selectable backends
|
Summary: Wrapper for audio decoding via selectable backends
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/sampsyo/audioread
|
Url: https://github.com/sampsyo/audioread
|
||||||
Source0: https://files.pythonhosted.org/packages/source/a/audioread/audioread-%{version}.tar.gz
|
Source0: https://github.com/beetbox/audioread/archive/v%{version}.tar.gz
|
||||||
Source10: https://raw.githubusercontent.com/beetbox/audioread/master/LICENSE
|
|
||||||
# PATCH-FIX-UPSTREAM
|
|
||||||
Patch0: 0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch
|
|
||||||
BuildRequires: %{python_module base}
|
BuildRequires: %{python_module base}
|
||||||
|
BuildRequires: %{python_module pytest-runner}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: ffmpeg
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Recommends: ffmpeg
|
Recommends: ffmpeg
|
||||||
@ -51,8 +51,6 @@ currently supports:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n audioread-%{version}
|
%setup -q -n audioread-%{version}
|
||||||
%patch0 -p1
|
|
||||||
cp %{SOURCE10} .
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -60,6 +58,9 @@ cp %{SOURCE10} .
|
|||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pytest
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
3
v2.1.8.tar.gz
Normal file
3
v2.1.8.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:40dcea83407c6ca36759d488386a8d5a9f43053a1c5d3e828dd905b331871b6f
|
||||||
|
size 111646
|
Loading…
x
Reference in New Issue
Block a user