From b61ce0e0197563446052434e9417316d9ed7f6194c12f18e128dffeba2d08014 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 14 Jan 2016 14:46:28 +0000 Subject: [PATCH] Accepting request 353703 from home:TheBlackCat:branches:devel:languages:python - Update to 1.31 - Cleanup update-alternatives - Implement unit tests OBS-URL: https://build.opensuse.org/request/show/353703 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mutagen?expand=0&rev=18 --- mutagen-1.28.tar.gz | 3 - mutagen-1.31.tar.gz | 3 + python-mutagen.changes | 49 ++++++++++++++++ python-mutagen.spec | 123 +++++++++++++++++++++-------------------- 4 files changed, 115 insertions(+), 63 deletions(-) delete mode 100644 mutagen-1.28.tar.gz create mode 100644 mutagen-1.31.tar.gz diff --git a/mutagen-1.28.tar.gz b/mutagen-1.28.tar.gz deleted file mode 100644 index 71efd91..0000000 --- a/mutagen-1.28.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7d45889c060fdb16aea1733cee92d6dcaa04b8c8574802eb7b43a9f465fa3ca9 -size 877463 diff --git a/mutagen-1.31.tar.gz b/mutagen-1.31.tar.gz new file mode 100644 index 0000000..0c8a81d --- /dev/null +++ b/mutagen-1.31.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0aa011707785fe30935d8655380052a20ba8b972aa738d4f144c457b35b4d699 +size 897785 diff --git a/python-mutagen.changes b/python-mutagen.changes index 44ec23b..784a403 100644 --- a/python-mutagen.changes +++ b/python-mutagen.changes @@ -1,3 +1,52 @@ +------------------------------------------------------------------- +Thu Jan 14 13:56:56 UTC 2016 - toddrme2178@gmail.com + +- Update to 1.31 + * New padding control API for flac/id3/mp4/asf/ogg/aiff and everything + based on it, except oggflac :bug:`229` + * Mutagen will now reduce padding on save if there is lots of it. + * delete() will remove padding in addition to tags. + * ASF: + * Padding support :bug:`201` + * Don't report negative lengths for some broken files + * New :class:`asf.ASFInfo`.codec_type/codec_name/codec_description + * Implement ASF.delete() + * OGG: Padding support for Opus/Vorbis/Theora/Speex + * M4A: Implementation removed. Every operation will raise. Use mp4 instead. + * Tools: Support Unicode output under Windows :bug:`232` +- Update to 1.30 + * FLAC: + * Fix :meth:`flac.FLAC.save` in case the source contained a too large + (invalid but recovered) image block :bug:`226` + * MP3: + * Improved length and bitrate accuracy: + * Read lame "Info" tags for improved bitrate/length accuracy + * Use bytes info of VBRI headers for improved bitrate accuracy + * Subtract encoder delay/padding from length for improved length accuracy + (especially for short tracks) + * Fix rare false identification of Xing headers :bug:`182` + * New :class:`mp3.MPEGInfo`.encoder_info attribute containing the encoder + name and version :bug:`66` + * New :class:`mp3.MPEGInfo`.bitrate_mode attribute exposing if the file is + VBR, ABR or CBR :bug:`24` :bug:`66` + * New :class:`mp3.MPEGInfo`.channels attribute providing the channel count + * New :class:`mp3.MPEGInfo`.track_gain/track_peak/album_gain values exposing + the replaygain info provided by the lame header :bug:`36` + * ID3: + * New :class:`id3.PictureType` enum for the picture type used in APIC frames :bug:`222` + * MP4: + * Fix MP4FreeForm.__eq__ and MP4Cover.__eq__ when comparing with bytes + :bug:`218` + * Don't raise on :meth:`FileType.save` if there are no tags. :bug:`227` + * Minor fixes: :bug:`228` +- Update to 1.29 + * mid3v2: Fix an error under Python 3 with files without tags :bug:`219` + * mid3v2: Various Windows+Python2+Unicode fixes :bug:`214` + * Don't emit warnings during loading (ID3Warning) :bug:`223` + * py.test support +- Clean up update-alternatives +- Implement unit tests + ------------------------------------------------------------------- Thu Apr 2 10:06:28 UTC 2015 - aplanas@suse.com diff --git a/python-mutagen.spec b/python-mutagen.spec index baca369..72eb22a 100644 --- a/python-mutagen.spec +++ b/python-mutagen.spec @@ -1,7 +1,7 @@ # # spec file for package python-mutagen # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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 @@ -17,7 +17,7 @@ Name: python-mutagen -Version: 1.28 +Version: 1.31 Release: 0 Summary: Python module to Handle Audio Metadata License: GPL-2.0 @@ -25,6 +25,7 @@ Group: Development/Libraries/Python Url: https://pypi.python.org/pypi/mutagen Source: https://pypi.python.org/packages/source/m/mutagen/mutagen-%{version}.tar.gz BuildRequires: python-devel +BuildRequires: python-pytest BuildRequires: python-setuptools Requires(post): update-alternatives Requires(postun): update-alternatives @@ -49,8 +50,11 @@ Ogg streams on an individual packet/page level. # remove shebangs from library files find mutagen/ -name "*.py" -exec sed -i -e '/^#!\s\?\/usr\/bin\/\(env\s\)\?python$/d' {} ';' +export LANG=en_US.UTF-8 for i in mid3cp mid3iconv mid3v2 moggsplit mutagen-inspect mutagen-pony; do + j=`echo $i|tr '-' '_'` sed -i "s/\"${i}\"/\"${i}-%{py_ver}\"/g" setup.py + sed -i "s/u\"${i}\"/u\"${i}-%{py_ver}\"/g" tests/test_tools_${j}.py mv tools/${i} tools/${i}-%{py_ver} mv man/${i}.1 man/${i}-%{py_ver}.1 done @@ -59,85 +63,84 @@ done python setup.py build %install -python setup.py install --root=%{buildroot} --prefix="%{_prefix}" -ln -sf %{_bindir}/mid3cp-%{py_ver} %{buildroot}%{_bindir}/mid3cp -ln -sf %{_bindir}/mid3iconv-%{py_ver} %{buildroot}%{_bindir}/mid3iconv -ln -sf %{_bindir}/mid3v2-%{py_ver} %{buildroot}%{_bindir}/mid3v2 -ln -sf %{_bindir}/moggsplit-%{py_ver} %{buildroot}%{_bindir}/moggsplit -ln -sf %{_bindir}/mutagen-inspect-%{py_ver} %{buildroot}%{_bindir}/mutagen-inspect -ln -sf %{_bindir}/mutagen-pony-%{py_ver} %{buildroot}%{_bindir}/mutagen-pony +python setup.py install --root=%{buildroot} --prefix="%{_prefix}" -ln -sf %{_mandir}/man1/mid3cp-%{py_ver}.1.gz %{buildroot}%{_mandir}/man1/mid3cp.1.gz -ln -sf %{_mandir}/man1/mid3iconv-%{py_ver}.1.gz %{buildroot}%{_mandir}/man1/mid3iconv.1.gz -ln -sf %{_mandir}/man1/mid3v2-%{py_ver}.1.gz %{buildroot}%{_mandir}/man1/mid3v2.1.gz -ln -sf %{_mandir}/man1/moggsplit-%{py_ver}.1.gz %{buildroot}%{_mandir}/man1/moggsplit.1.gz -ln -sf %{_mandir}/man1/mutagen-inspect-%{py_ver}.1.gz %{buildroot}%{_mandir}/man1/mutagen-inspect.1.gz -ln -sf %{_mandir}/man1/mutagen-pony-%{py_ver}.1.gz %{buildroot}%{_mandir}/man1/mutagen-pony.1.gz - -%pre -# Since binaries became ghosted to be used with update-alternatives, we have to get rid -# of the old binary resulting from the non-update-alternativies-ified package: -[ -h %{_bindir}/mid3cp ] || rm -f %{_bindir}/mid3cp -[ -h %{_bindir}/mid3iconv ] || rm -f %{_bindir}/mid3iconv -[ -h %{_bindir}/mid3v2 ] || rm -f %{_bindir}/mid3v2 -[ -h %{_bindir}/moggsplit ] || rm -f %{_bindir}/moggsplit -[ -h %{_bindir}/mutagen-inspect ] || rm -f %{_bindir}/mutagen-inspect -[ -h %{_bindir}/mutagen-pony ] || rm -f %{_bindir}/mutagen-pony -[ -h %{_mandir}/man1/mid3cp.1.gz ] || rm -f %{_mandir}/man1/mid3cp.1.gz -[ -h %{_mandir}/man1/mid3iconv.1.gz ] || rm -f %{_mandir}/man1/mid3iconv.1.gz -[ -h %{_mandir}/man1/mid3v2.1.gz ] || rm -f %{_mandir}/man1/mid3v2.1.gz -[ -h %{_mandir}/man1/moggsplit.1.gz ] || rm -f %{_mandir}/man1/moggsplit.1.gz -[ -h %{_mandir}/man1/mutagen-inspect.1.gz ] || rm -f %{_mandir}/man1/mutagen-inspect.1.gz -[ -h %{_mandir}/man1/mutagen-pony.1.gz ] || rm -f %{_mandir}/man1/mutagen-pony.1.gz +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +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 + # create a dummy target for /etc/alternatives/$p and /etc/alternatives/$p.1.gz + touch %{buildroot}%{_sysconfdir}/alternatives/$p + touch %{buildroot}%{_sysconfdir}/alternatives/$p.1.gz +done %post -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} \ ---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 \ ---slave %{_mandir}/man1/moggsplit.1.gz moggsplit.1.gz %{_mandir}/man1/moggsplit-%{py_ver}.1.gz \ ---slave %{_mandir}/man1/mutagen-inspect.1.gz mutagen-inspect.1.gz %{_mandir}/man1/mutagen-inspect-%{py_ver}.1.gz \ ---slave %{_mandir}/man1/mutagen-pony.1.gz mutagen-pony.1.gz %{_mandir}/man1/mutagen-pony-%{py_ver}.1.gz +"%_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 %{_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 \ + --slave %{_mandir}/man1/moggsplit.1.gz moggsplit.1.gz %{_mandir}/man1/moggsplit-%{py_ver}.1.gz \ + --slave %{_mandir}/man1/mutagen-inspect.1.gz mutagen-inspect.1.gz %{_mandir}/man1/mutagen-inspect-%{py_ver}.1.gz \ + --slave %{_mandir}/man1/mutagen-pony.1.gz mutagen-pony.1.gz %{_mandir}/man1/mutagen-pony-%{py_ver}.1.gz -%preun +%postun if [ $1 -eq 0 ] ; then - update-alternatives --remove mid3cp %{_bindir}/mid3cp-%{py_ver} + "%_sbindir/update-alternatives" --remove mid3cp %{_bindir}/mid3cp-%{py_ver} fi +%check +export LANG=en_US.UTF-8 +export PATH="$PATH:%{buildroot}%{_bindir}" +export PYTHONPATH="$PYTHONPATH:%{buildroot}%{python_sitelib}" +python setup.py test + %files %defattr(-, root, root, 0755) %doc COPYING NEWS README.rst -%ghost %{_bindir}/mid3cp +%{_bindir}/mid3cp +%{_bindir}/mid3iconv +%{_bindir}/mid3v2 +%{_bindir}/moggsplit +%{_bindir}/mutagen-inspect +%{_bindir}/mutagen-pony %{_bindir}/mid3cp-%{py_ver} -%ghost %{_bindir}/mid3iconv %{_bindir}/mid3iconv-%{py_ver} -%ghost %{_bindir}/mid3v2 %{_bindir}/mid3v2-%{py_ver} -%ghost %{_bindir}/moggsplit %{_bindir}/moggsplit-%{py_ver} -%ghost %{_bindir}/mutagen-inspect %{_bindir}/mutagen-inspect-%{py_ver} -%ghost %{_bindir}/mutagen-pony %{_bindir}/mutagen-pony-%{py_ver} -%{python_sitelib}/mutagen -%{python_sitelib}/mutagen-%{version}-py%{py_ver}.egg-info -%ghost %{_mandir}/man1/mid3cp.1.gz +%ghost %{_sysconfdir}/alternatives/mid3cp +%ghost %{_sysconfdir}/alternatives/mid3iconv +%ghost %{_sysconfdir}/alternatives/mid3v2 +%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 -%ghost %{_mandir}/man1/mid3iconv.1.gz %{_mandir}/man1/mid3iconv-%{py_ver}.1.gz -%ghost %{_mandir}/man1/mid3v2.1.gz %{_mandir}/man1/mid3v2-%{py_ver}.1.gz -%ghost %{_mandir}/man1/moggsplit.1.gz %{_mandir}/man1/moggsplit-%{py_ver}.1.gz -%ghost %{_mandir}/man1/mutagen-inspect.1.gz %{_mandir}/man1/mutagen-inspect-%{py_ver}.1.gz -%ghost %{_mandir}/man1/mutagen-pony.1.gz %{_mandir}/man1/mutagen-pony-%{py_ver}.1.gz +%ghost %{_sysconfdir}/alternatives/mid3cp.1.gz +%ghost %{_sysconfdir}/alternatives/mid3iconv.1.gz +%ghost %{_sysconfdir}/alternatives/mid3v2.1.gz +%ghost %{_sysconfdir}/alternatives/moggsplit.1.gz +%ghost %{_sysconfdir}/alternatives/mutagen-inspect.1.gz +%ghost %{_sysconfdir}/alternatives/mutagen-pony.1.gz +%{python_sitelib}/mutagen +%{python_sitelib}/mutagen-%{version}-py*.egg-info %changelog