diff --git a/fix-tests-tools-names.diff b/fix-tests-tools-names.diff new file mode 100644 index 0000000..50d664a --- /dev/null +++ b/fix-tests-tools-names.diff @@ -0,0 +1,13 @@ +Index: mutagen-1.36.1/tests/test_tools.py +=================================================================== +--- mutagen-1.36.1.orig/tests/test_tools.py ++++ mutagen-1.36.1/tests/test_tools.py +@@ -12,7 +12,7 @@ from tests import TestCase + + def get_var(tool_name, entry="main"): + mod = importlib.import_module( +- "mutagen._tools.%s" % tool_name.replace("-", "_")) ++ "mutagen._tools.%s" % tool_name.replace("-", "_")[:tool_name.find('-2')]) + return getattr(mod, entry) + + diff --git a/fix_SynchronizedTextSpec_test_on_BE.patch b/fix_SynchronizedTextSpec_test_on_BE.patch deleted file mode 100644 index a7d096b..0000000 --- a/fix_SynchronizedTextSpec_test_on_BE.patch +++ /dev/null @@ -1,30 +0,0 @@ -Subject: fix SynchronizedTextSpec test on BE -Date: Mon, 11 Apr 2016 10:40:52 +0200 - -fix SynchronizedTextSpec test on BE -as per upstream https://bitbucket.org/lazka/mutagen/commits/c4d43fa880d7363c2b78ed6270171911b9da77a2 - ---- - tests/test__id3specs.py | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -Index: mutagen-1.31/tests/test__id3specs.py -=================================================================== ---- mutagen-1.31.orig/tests/test__id3specs.py -+++ mutagen-1.31/tests/test__id3specs.py -@@ -102,8 +102,13 @@ class SpecSanityChecks(TestCase): - # utf-16 - f.encoding = 1 - self.assertEqual(s.read(f, s.write(f, values)), (values, b"")) -- self.assertEquals( -- s.write(f, [(u"A", 100)]), b"\xff\xfeA\x00\x00\x00\x00\x00\x00d") -+ data = s.write(f, [(u"A", 100)]) -+ if sys.byteorder == 'little': -+ self.assertEquals( -+ data, b"\xff\xfeA\x00\x00\x00\x00\x00\x00d") -+ else: -+ self.assertEquals( -+ data, b"\xfe\xff\x00A\x00\x00\x00\x00\x00d") - - # utf-16be - f.encoding = 2 diff --git a/mutagen-1.31.tar.gz b/mutagen-1.31.tar.gz deleted file mode 100644 index 0c8a81d..0000000 --- a/mutagen-1.31.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0aa011707785fe30935d8655380052a20ba8b972aa738d4f144c457b35b4d699 -size 897785 diff --git a/mutagen-1.37.tar.gz b/mutagen-1.37.tar.gz new file mode 100644 index 0000000..851525b --- /dev/null +++ b/mutagen-1.37.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:539553d3f1ffd890c74f64b819750aef0316933d162c09798c9e7eaf334ae760 +size 912600 diff --git a/python-mutagen.changes b/python-mutagen.changes index 6e8db0c..0fe9938 100644 --- a/python-mutagen.changes +++ b/python-mutagen.changes @@ -1,3 +1,64 @@ +------------------------------------------------------------------- +Wed Mar 22 14:58:43 UTC 2017 - tbechtold@suse.com + +- Use files.pythonhosted.org for Source url + +------------------------------------------------------------------- +Thu Mar 16 13:14:53 UTC 2017 - alarrosa@suse.com + +- update to version 1.37: + * Relicense "GPLv2" → "GPLv2 or later" :bug:`291` + * DSF: add `mutagen.dsf` module for DSF (DSD Stream File) support + :pr:`283` (Boris Pruessmann) + * MP3: Add `mp3.MPEGInfo.encoder_settings` containing a guess of the encoder + settings used, for example ``"-V2"`` for LAME :bug:`66` + * ID3: add iTunes movement related frames `id3.MVIN` and `id3.MVNM` + * MP4: support ``©mvi``, ``©mvc``, ``shwm``, ``stik``, ``rtng``, ``tves``, + ``tvsn``, ``plID``, ``cnID``, ``geID``, ``atID``, ``sfID``, ``cmID``, + ``akID`` :bug:`130` +- update to version 1.36.3: + * MP3: fix error with xing frames without a frame count :bug:`292` +- Run spec file through spec-cleaner + +------------------------------------------------------------------- +Wed Jan 25 14:31:30 UTC 2017 - alarrosa@suse.com + +- update to version 1.36.2: + * ID3: Always write little endian utf-16 with BOM. + Fixes tests on big endian machines :pr:`289` +- update to version 1.36.1: + * Support GAE runtime :bug:`286` + * FLAC: Fix crash when loading files with zero samples :bug:`287` + * MP3: Handle broken lame tags written by older lame versions +- update to version 1.36: + * ID3: Ignore trailing empty values for v2.3 text frames :bug:`276` + * ID3: Write large APIC frames last :bug:`278` + * EasyID3: support saving as v2.3 :bug:`188` + * FLAC: Add StreamInfo.bitrate :bug:`279` + * mid3cp: Add ``--merge`` option :bug:`277` + * MP4: Allow loading files without audio tracks :bug:`272` +- update to version 1.35.1: + * Revert back to distutils :bug:`273` +- update to version 1.35: + * Tests: Require pytest + * Tools: Install .exe launchers on Windows + * setup.py: Require setuptools + * ID3: + * Fix loading files with CRM frames :bug:`239` + * Fix loading AENC, LINK, GRID frames with no payload + * Merge duplicate text frames with same key on load :bug:`172` + * Allow parsing of duplicate APIC frames :bug:`172` + * Parse utf-16 text fields with missing BOM :bug:`267` + * Increase max resyncs for the mpeg frame search :bug:`268` +- Add fix-tests-tools-names.diff. This fixes the tests to run + successfully since they try to extract the module name from the tool + name, but we changed the tools names so they can be co-installed + with the python2 version of the tools, so we have to remove the + "-3" suffix before importing the modules. +- Fix update-alternatives execution as mutagen-inspect and mutagen-pony + binaries had manpage suffixes so alternative links were not created. +- Drop fix_SynchronizedTextSpec_test_on_BE.patch (upstream included it). + ------------------------------------------------------------------- Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com diff --git a/python-mutagen.spec b/python-mutagen.spec index 713c298..a975764 100644 --- a/python-mutagen.spec +++ b/python-mutagen.spec @@ -1,7 +1,7 @@ # # spec file for package python-mutagen # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,26 +16,27 @@ # -Name: python-mutagen -Version: 1.31 -Release: 0 -Summary: Python module to Handle Audio Metadata -License: GPL-2.0 -Group: Development/Libraries/Python -Url: https://pypi.python.org/pypi/mutagen -Source: https://pypi.python.org/packages/source/m/mutagen/mutagen-%{version}.tar.gz -Patch1: fix_SynchronizedTextSpec_test_on_BE.patch -BuildRequires: python-devel -BuildRequires: python-pytest -BuildRequires: python-setuptools -Requires(post): update-alternatives -Requires(preun): update-alternatives -BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else BuildArch: noarch %endif +Name: python-mutagen +Version: 1.37 +Release: 0 +Summary: Python module to Handle Audio Metadata +License: GPL-2.0+ +Group: Development/Libraries/Python +Url: https://pypi.python.org/pypi/mutagen +Source: https://files.pythonhosted.org/packages/source/m/mutagen/mutagen-%{version}.tar.gz +# PATCH-FIX-OPENSUSE fix-tests-tools-names.diff -- Undo the alternate-names of the tools when importing the modules so tests build successfully. +Patch0: fix-tests-tools-names.diff +BuildRequires: python-devel +BuildRequires: python-pytest +BuildRequires: python-setuptools +Requires(post): update-alternatives +Requires(preun): update-alternatives +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Mutagen is a Python module to handle audio metadata. It supports FLAC, @@ -48,7 +49,7 @@ Ogg streams on an individual packet/page level. %prep %setup -q -n mutagen-%{version} -%patch1 -p1 +%patch0 -p1 # remove shebangs from library files find mutagen/ -name "*.py" -exec sed -i -e '/^#!\s\?\/usr\/bin\/\(env\s\)\?python$/d' {} ';' @@ -69,19 +70,19 @@ python setup.py install --root=%{buildroot} --prefix="%{_prefix}" # Prepare for update-alternatives usage mkdir -p %{buildroot}%{_sysconfdir}/alternatives -for p in mid3cp mid3iconv mid3v2 moggsplit mutagen-inspect mutagen-pony; do +for p in mid3cp mid3iconv mid3v2 moggsplit mutagen-inspect mutagen-pony; do ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p ln -s -f %{_sysconfdir}/alternatives/$p.1.gz %{buildroot}%{_mandir}/man1/${p}.1.gz done %post -%_sbindir/update-alternatives \ +%{_sbindir}/update-alternatives \ --install %{_bindir}/mid3cp mid3cp %{_bindir}/mid3cp-%{py_ver} 30 \ --slave %{_bindir}/mid3iconv mid3iconv %{_bindir}/mid3iconv-%{py_ver} \ --slave %{_bindir}/mid3v2 mid3v2 %{_bindir}/mid3v2-%{py_ver} \ --slave %{_bindir}/moggsplit moggsplit %{_bindir}/moggsplit-%{py_ver} \ - --slave %{_bindir}/mutagen-inspect mutagen-inspect %{_bindir}/mutagen-inspect-%{py_ver}.1.gz \ - --slave %{_bindir}/mutagen-pony mutagen-pony %{_bindir}/mutagen-pony-%{py_ver}.1.gz \ + --slave %{_bindir}/mutagen-inspect mutagen-inspect %{_bindir}/mutagen-inspect-%{py_ver} \ + --slave %{_bindir}/mutagen-pony mutagen-pony %{_bindir}/mutagen-pony-%{py_ver} \ --slave %{_mandir}/man1/mid3cp.1.gz mid3cp.1.gz %{_mandir}/man1/mid3cp-%{py_ver}.1.gz \ --slave %{_mandir}/man1/mid3iconv.1.gz mid3iconv.1.gz %{_mandir}/man1/mid3iconv-%{py_ver}.1.gz \ --slave %{_mandir}/man1/mid3v2.1.gz mid3v2.1.gz %{_mandir}/man1/mid3v2-%{py_ver}.1.gz \ @@ -91,7 +92,7 @@ done %preun if [ $1 -eq 0 ] ; then - %_sbindir/update-alternatives --remove mid3cp %{_bindir}/mid3cp-%{py_ver} + %{_sbindir}/update-alternatives --remove mid3cp %{_bindir}/mid3cp-%{py_ver} fi %check @@ -121,18 +122,18 @@ python setup.py test %ghost %{_sysconfdir}/alternatives/moggsplit %ghost %{_sysconfdir}/alternatives/mutagen-inspect %ghost %{_sysconfdir}/alternatives/mutagen-pony -%{_mandir}/man1/mid3cp.1.gz -%{_mandir}/man1/mid3iconv.1.gz -%{_mandir}/man1/mid3v2.1.gz -%{_mandir}/man1/moggsplit.1.gz -%{_mandir}/man1/mutagen-inspect.1.gz -%{_mandir}/man1/mutagen-pony.1.gz -%{_mandir}/man1/mid3cp-%{py_ver}.1.gz -%{_mandir}/man1/mid3iconv-%{py_ver}.1.gz -%{_mandir}/man1/mid3v2-%{py_ver}.1.gz -%{_mandir}/man1/moggsplit-%{py_ver}.1.gz -%{_mandir}/man1/mutagen-inspect-%{py_ver}.1.gz -%{_mandir}/man1/mutagen-pony-%{py_ver}.1.gz +%{_mandir}/man1/mid3cp.1%{ext_man} +%{_mandir}/man1/mid3iconv.1%{ext_man} +%{_mandir}/man1/mid3v2.1%{ext_man} +%{_mandir}/man1/moggsplit.1%{ext_man} +%{_mandir}/man1/mutagen-inspect.1%{ext_man} +%{_mandir}/man1/mutagen-pony.1%{ext_man} +%{_mandir}/man1/mid3cp-%{py_ver}.1%{ext_man} +%{_mandir}/man1/mid3iconv-%{py_ver}.1%{ext_man} +%{_mandir}/man1/mid3v2-%{py_ver}.1%{ext_man} +%{_mandir}/man1/moggsplit-%{py_ver}.1%{ext_man} +%{_mandir}/man1/mutagen-inspect-%{py_ver}.1%{ext_man} +%{_mandir}/man1/mutagen-pony-%{py_ver}.1%{ext_man} %ghost %{_sysconfdir}/alternatives/mid3cp.1.gz %ghost %{_sysconfdir}/alternatives/mid3iconv.1.gz %ghost %{_sysconfdir}/alternatives/mid3v2.1.gz