14
0

Accepting request 701953 from home:pgajdos

- version update to 1.4.5
  * Fix published taglib.cpp
  * Remove cython dependency from setup.py
- added patches
  fix  'LocalPath'object has no attribute 'endswith' for python2
  + python-pytaglib-python2-localpath.patch

OBS-URL: https://build.opensuse.org/request/show/701953
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytaglib?expand=0&rev=8
This commit is contained in:
Tomáš Chvátal
2019-05-15 16:11:57 +00:00
committed by Git OBS Bridge
parent d92e67fa89
commit ee6bee7261
5 changed files with 40 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytaglib
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 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
@@ -12,21 +12,25 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytaglib
Version: 1.4.3
Version: 1.4.5
Release: 0
Summary: Metadata "tagging" library based on TagLib
License: GPL-3.0-or-later
License: GPL-3.0-only OR MIT
Group: Development/Libraries/Python
URL: https://github.com/supermihi/pytaglib
Source: https://files.pythonhosted.org/packages/source/p/pytaglib/pytaglib-%{version}.tar.gz
Source: https://github.com/supermihi/pytaglib/archive/v%{version}.tar.gz
# https://github.com/supermihi/pytaglib/issues/63
# fix 'LocalPath'object has no attribute 'endswith' for python2
Patch0: python-pytaglib-python2-localpath.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: gcc-c++
@@ -41,6 +45,7 @@ It relies on the TagLib C++ library.
%prep
%setup -q -n "pytaglib-%{version}"
%patch0 -p1
# Remove pre-generated source
rm -vf src/taglib.cpp
sed -i -e "1d" src/pyprinttags.py
@@ -52,6 +57,9 @@ sed -i -e "1d" src/pyprinttags.py
%python_install
mv %{buildroot}%{_bindir}/pyprinttags3 %{buildroot}/%{_bindir}/pyprinttags
%python_expand %fdupes -s %{buildroot}%{$python_sitearch}
# https://github.com/supermihi/pytaglib/issues/62
mkdir -p %{buildroot}%{python3_sitelib}
install -m 644 src/pyprinttags.py %{buildroot}%{python3_sitelib}
%check
export LANG=en_US.UTF-8
@@ -59,10 +67,9 @@ export LANG=en_US.UTF-8
%files %{python_files}
%license COPYING
%doc README.txt
%doc README.md
%python3_only %{_bindir}/pyprinttags
%pycache_only %{python_sitearch}/__pycache__
%{python_sitearch}/pyprinttags.py*
%python3_only %{python3_sitelib}/pyprinttags.py
%{python_sitearch}/taglib*.so
%{python_sitearch}/pytaglib-%{version}-py%{python_version}.egg-info/