2017-05-21 15:32:23 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pytaglib
|
|
|
|
#
|
2021-12-17 10:47:57 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2017-05-21 15:32:23 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-05-15 16:11:57 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-05-21 15:32:23 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-pytaglib
|
2020-03-24 07:36:14 +00:00
|
|
|
Version: 1.4.6
|
2017-05-21 15:32:23 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Metadata "tagging" library based on TagLib
|
2019-05-15 16:11:57 +00:00
|
|
|
License: GPL-3.0-only OR MIT
|
2018-08-09 15:36:33 +00:00
|
|
|
URL: https://github.com/supermihi/pytaglib
|
2019-05-15 16:11:57 +00:00
|
|
|
Source: https://github.com/supermihi/pytaglib/archive/v%{version}.tar.gz
|
2018-08-09 15:36:33 +00:00
|
|
|
BuildRequires: %{python_module Cython}
|
2017-05-21 15:32:23 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2021-12-17 10:47:57 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2017-05-21 15:32:23 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libtag-devel
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-03-24 07:36:14 +00:00
|
|
|
Requires: python-setuptools
|
2021-12-17 10:47:57 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun):update-alternatives
|
2017-05-21 15:32:23 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2017-06-06 08:31:15 +00:00
|
|
|
pytaglib is an audio metadata (“tag”) library for Python.
|
|
|
|
It relies on the TagLib C++ library.
|
2017-05-21 15:32:23 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n "pytaglib-%{version}"
|
2018-08-09 15:36:33 +00:00
|
|
|
# Remove pre-generated source
|
|
|
|
rm -vf src/taglib.cpp
|
2017-05-21 15:32:23 +00:00
|
|
|
sed -i -e "1d" src/pyprinttags.py
|
|
|
|
|
|
|
|
%build
|
2020-03-24 07:36:14 +00:00
|
|
|
sed -i "s:\(script_name =\).*:\1 'pyprinttags':" setup.py
|
|
|
|
export PYTAGLIB_CYTHONIZE=1
|
|
|
|
%python_build
|
2017-05-21 15:32:23 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2019-10-14 14:35:41 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2020-03-24 07:36:14 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyprinttags
|
2017-05-21 15:32:23 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
2020-03-24 07:36:14 +00:00
|
|
|
%pytest_arch
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative pyprinttags
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pyprinttags
|
2017-05-21 15:32:23 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
2018-08-09 15:36:33 +00:00
|
|
|
%license COPYING
|
2019-05-15 16:11:57 +00:00
|
|
|
%doc README.md
|
2017-05-21 15:32:23 +00:00
|
|
|
%{python_sitearch}/taglib*.so
|
2020-03-24 07:36:14 +00:00
|
|
|
%{python_sitearch}/pyprinttags.*
|
2017-05-21 15:32:23 +00:00
|
|
|
%{python_sitearch}/pytaglib-%{version}-py%{python_version}.egg-info/
|
2020-03-24 07:36:14 +00:00
|
|
|
%pycache_only %{python_sitearch}/__pycache__/pyprinttags.*
|
|
|
|
%python_alternative %{_bindir}/pyprinttags
|
2017-05-21 15:32:23 +00:00
|
|
|
|
|
|
|
%changelog
|