File python-eyeD3.spec of Package python-eyeD3

#
# spec file for package python-eyeD3
#
# Copyright (c) 2015 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-%{**}}
%define skip_python2 1
%define skip_python36 1
Name:           python-eyeD3
Summary:        Python Module for ID3 Tag Manipulation
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Utilities
Version:        0.9.7
Release:        0
# we're fetching from gh, since this tarball contains the docs as well
Source:         https://github.com/nicfit/eyeD3/archive/v%{version}.tar.gz#/eyeD3-%{version}.tar.gz
URL:            https://eyed3.readthedocs.io
#BuildRequires:  %%{python_module grako}
BuildRequires:  %{python_module packaging}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{pythons}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# TODO: testing requires a lot of specific packages and test data
Requires:       python-certifi
Requires:       python-chardet
Requires:       python-deprecation
Requires:       python-filetype
Requires:       python-idna
Requires:       python-pyparsing
Requires:       python-ruamel.yaml
Recommends:     python-Pillow
#Recommends:     python-grako
Recommends:     python-pylast
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch:      noarch
%python_subpackages

%description
A Python module and command line program for processing ID3 tags. Information
about mp3 files (i.e bit rate, sample frequency, play time, etc.) is also
provided. The formats supported are ID3 v1.0/v1.1 and v2.3/v2.4.

%prep
%setup -q -n eyeD3-%{version}
find docs -name .keep\* -delete
# remove stray shebang from a generated file
#sed -i '1!b;/^#!\/usr\/bin\/env python/d' eyed3/plugins/_display_parser.py

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/eyeD3
%python_expand %fdupes %{buildroot}%{$python_sitelib}/eyed3

#%%check
#%%pytest

%post
%python_install_alternative eyeD3

%postun
%python_uninstall_alternative eyeD3

%files %{python_files}
%defattr(-,root,root,-)
%license LICENSE
%doc *.rst docs/
%python_alternative %{_bindir}/eyeD3
%{python_sitelib}/eyed3-%{version}-py*.egg-info
%{python_sitelib}/eyed3

%changelog

openSUSE Build Service is sponsored by