File python3-musicbrainzngs.spec of Package python3-musicbrainzngs

#
# spec file for package python3-musicbrainzngs
#
# Copyright (c) 2017 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/


Name:           python3-musicbrainzngs
Version:        0.6
Release:        0
License:        BSD-2-Clause and ISC
Summary:        Python bindings for the MusicBrainz NGS and the Cover Art Archive webservices
Url:            https://python-musicbrainzngs.readthedocs.org/
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/m/musicbrainzngs/musicbrainzngs-0.6.tar.gz
# PATCH-FIX-OPENSUSE - Open XML files in binary mode, as they contain non-ASCII 
Patch0:         0001-Open-XML-files-in-binary-mode.patch
# PATCH-FIX-OPENSUSE - Remove duplicate import
Patch1:         0001-Remove-duplicate-import.patch
# PATCH-FIX-OPENSUSE - Set useragent and do auth in test_submit setup
Patch2:         0002-Set-useragent-and-do-auth-in-test_submit-setup.patch
# PATCH-FIX-OPENSUSE - Disable rate limiting in test_requests
Patch3:         0003-Disable-rate-limiting-in-test_requests.patch
# PATCH-FIX-OPENSUSE - Convert the CAA response data to unicode before loading it via json
Patch4:         0004-Conver-the-CAA-response-data-to-unicode-before-loading-via-json.patch
# PATCH-FIX-OPENSUSE - add "work-level-rels" support for recording lookup
Patch5:         0005-add-work-level-rels-support-for-recording-lookup.patch
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
This library implements webservice bindings for the Musicbrainz NGS site, also known as /ws/2
and the Cover Art Archive <https://coverartarchive.org/>.

For more information on the musicbrainz webservice see http://wiki.musicbrainz.org/XML_Web_Service.

%prep
%setup -q -n musicbrainzngs-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

%build
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
python3 setup.py test

%files
%defattr(-,root,root,-)
%doc COPYING CHANGES README.rst
%{python3_sitelib}/*

%changelog
openSUSE Build Service is sponsored by