15
0
Files
python-mutagen/python-mutagen.spec

96 lines
3.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-mutagen
#
Accepting request 452417 from home:alarrosa:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/452417 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mutagen?expand=0&rev=24
2017-01-26 09:13:45 +00:00
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
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 reduce-test-length.diff alarrosa@suse.com -- Reduce the number of iterations so tests don't take so long to finish
Patch0: reduce-test-length.diff
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Mutagen is a Python module to handle audio metadata. It supports FLAC,
M4A, MP3, Ogg FLAC, Ogg Speex, Ogg Theora, Ogg Vorbis, True Audio, and
WavPack audio files. All versions of ID3v2 are supported, and all
standard ID3v2.4 frames are parsed. It can read Xing headers to
accurately calculate the bitrate and length of MP3s. ID3 and APEv2 tags
can be edited regardless of their audio format. It can also manipulate
Ogg streams on an individual packet/page level.
%prep
%setup -q -n mutagen-%{version}
Accepting request 452417 from home:alarrosa:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/452417 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mutagen?expand=0&rev=24
2017-01-26 09:13:45 +00:00
%patch0 -p1
# remove shebangs from library files
find mutagen/ -name "*.py" -exec sed -i -e '/^#!\s\?\/usr\/bin\/\(env\s\)\?python$/d' {} ';'
%build
%python_build
%install
%python_install
for i in mid3cp mid3iconv mid3v2 moggsplit mutagen-inspect mutagen-pony; do
%python_clone -a %{buildroot}%{_bindir}/${i}
%python_clone -a %{buildroot}%{_mandir}/man1/${i}.1
done
%python_expand %fdupes %{buildroot}%{$python_sitelib}/mutagen
%post
%{python_install_alternative mid3cp mid3iconv mid3v2 moggsplit mutagen-inspect mutagen-pony mid3cp.1 mid3iconv.1 mid3v2.1 moggsplit.1 mutagen-inspect.1 mutagen-pony.1}
%preun
%{python_uninstall_alternative mid3cp}
%check
export LANG=en_US.UTF-8
#export PATH="$PATH:%%{buildroot}%%{_bindir}"
%python_exec setup.py test
%files %{python_files}
%defattr(-, root, root, 0755)
%doc COPYING NEWS README.rst
%python_alternative %{_bindir}/mid3cp
%python_alternative %{_bindir}/mid3iconv
%python_alternative %{_bindir}/mid3v2
%python_alternative %{_bindir}/moggsplit
%python_alternative %{_bindir}/mutagen-inspect
%python_alternative %{_bindir}/mutagen-pony
%python_alternative %{_mandir}/man1/mid3cp.1%{ext_man}
%python_alternative %{_mandir}/man1/mid3iconv.1%{ext_man}
%python_alternative %{_mandir}/man1/mid3v2.1%{ext_man}
%python_alternative %{_mandir}/man1/moggsplit.1%{ext_man}
%python_alternative %{_mandir}/man1/mutagen-inspect.1%{ext_man}
%python_alternative %{_mandir}/man1/mutagen-pony.1%{ext_man}
%{python_sitelib}/mutagen
%{python_sitelib}/mutagen-%{version}-py%{python_version}.egg-info
%changelog