14
0

Accepting request 787685 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/787685
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytaglib?expand=0&rev=6
This commit is contained in:
2020-03-24 21:35:34 +00:00
committed by Git OBS Bridge
5 changed files with 30 additions and 29 deletions

View File

@@ -1,12 +0,0 @@
Index: pytaglib-1.4.5/tests/__init__.py
===================================================================
--- pytaglib-1.4.5.orig/tests/__init__.py 2019-03-26 21:48:08.000000000 +0100
+++ pytaglib-1.4.5/tests/__init__.py 2019-05-09 15:30:36.799060223 +0200
@@ -12,6 +12,6 @@ import os.path, shutil
def copy_test_file(filename, tmpdir):
"""Make a temporary copy of test data file *name* (without dir) and return its full path."""
source = os.path.join(os.path.dirname(__file__), 'data', filename)
- target = os.path.join(tmpdir, filename)
+ target = os.path.join(tmpdir.strpath, filename)
shutil.copyfile(source, target)
return target

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Mar 23 11:44:33 UTC 2020 - pgajdos@suse.com
- version update to 1.4.6
- fix #65: use tox for testing. Request re-cythonizing module with environment variable `PYTAGLIB_CYTHONIZE` instead of argument to `setup.py` now.
- fix #63: python2 tests did not pass
- fix #62: pyprinttags module did not work
- deleted patches
- python-pytaglib-python2-localpath.patch (upstreamed)
-------------------------------------------------------------------
Mon Oct 14 14:35:29 UTC 2019 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytaglib
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytaglib
Version: 1.4.5
Version: 1.4.6
Release: 0
Summary: Metadata "tagging" library based on TagLib
License: GPL-3.0-only OR MIT
URL: https://github.com/supermihi/pytaglib
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}
@@ -35,6 +32,7 @@ BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libtag-devel
BuildRequires: python-rpm-macros
Requires: python-setuptools
%python_subpackages
%description
@@ -43,32 +41,37 @@ 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
%build
%python_build "--cython"
sed -i "s:\(script_name =\).*:\1 'pyprinttags':" setup.py
export PYTAGLIB_CYTHONIZE=1
%python_build
%install
%python_install
mv %{buildroot}%{_bindir}/pyprinttags3 %{buildroot}/%{_bindir}/pyprinttags
%python_expand %fdupes %{buildroot}%{$python_sitearch}
# https://github.com/supermihi/pytaglib/issues/62
mkdir -p %{buildroot}%{python3_sitelib}
install -m 644 src/pyprinttags.py %{buildroot}%{python3_sitelib}
%python_clone -a %{buildroot}%{_bindir}/pyprinttags
%check
export LANG=en_US.UTF-8
%python_exec setup.py test
%pytest_arch
%post
%python_install_alternative pyprinttags
%postun
%python_uninstall_alternative pyprinttags
%files %{python_files}
%license COPYING
%doc README.md
%python3_only %{_bindir}/pyprinttags
%python3_only %{python3_sitelib}/pyprinttags.py
%{python_sitearch}/taglib*.so
%{python_sitearch}/pyprinttags.*
%{python_sitearch}/pytaglib-%{version}-py%{python_version}.egg-info/
%pycache_only %{python_sitearch}/__pycache__/pyprinttags.*
%python_alternative %{_bindir}/pyprinttags
%changelog

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:78d9da23bd9666fb05729b51674b0f09eae27783c95597e260853f66cf361554
size 467498

3
v1.4.6.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:360b12d5b4c948cebf75acf86fac6b33a3f044eab6fcfe8949a1cd0f9c22bd25
size 467771