Blob Blame History Raw
%global modname pytaglib

Name:           python-%{modname}
Version:        1.4.1
Release:        1%{?dist}
Summary:        Python audio metadata ("tagging") library based on TagLib

License:        GPLv3+
Source0:        %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz

BuildRequires:  gcc-c++
BuildRequires:  taglib-devel

%global _description \
pytaglib is a full-featured, easy-to-use, cross-platform audio metadata\
(“tag”) library for Python (all versions supported). It uses the popular,\
fast and rock-solid TagLib C++ library internally.\
pytaglib is a very thin wrapper about TagLib (<150 lines of code), meaning\
that you immediately profit from the underlying library’s speed and stability.

%description %{_description}

%package -n python2-%{modname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{modname}}
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python2-Cython

%description -n python2-%{modname} %{_description}

Python 2 version.

%package -n python3-%{modname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-Cython

%description -n python3-%{modname} %{_description}

Python 3 version.

%autosetup -n %{modname}-%{version}
# Remove pre-generated source
rm -vf src/taglib.cpp
# remove useless shebang
sed -i -e '1{\@^#!/usr/bin/env python@d}' src/

%py2_build "--cython"
%py3_build "--cython"

# Not interested in having 2 binaries doing same thing
mv -f %{buildroot}%{_bindir}/pyprinttags{3,}

export LC_ALL=C.UTF-8
%{__python2} test
%{__python3} test

%files -n python2-%{modname}
%license COPYING
%doc NEWS

%files -n python3-%{modname}
%license COPYING
%doc NEWS

* Sat Sep 30 2017 Igor Gnatenko <> - 1.4.1-1
- Update to 1.4.1

* Thu Aug 03 2017 Fedora Release Engineering <> - 1.4.0-4
- Rebuilt for

* Thu Jul 27 2017 Fedora Release Engineering <> - 1.4.0-3
- Rebuilt for

* Sat Feb 11 2017 Fedora Release Engineering <> - 1.4.0-2
- Rebuilt for

* Sat Dec 31 2016 Igor Gnatenko <> - 1.4.0-1
- Initial package