File python3-discid.spec of Package python3-discid

#
# spec file for package python3-discid
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Johannes Dewender <novell@JonnyJD.net>
#
# 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-discid
Version:        1.1.1
Release:        0
Summary:        Python binding of Libdiscid
License:        LGPL-3.0+
Group:          Development/Libraries/Python
URL:            https://python-discid.readthedocs.org/
Source:         https://files.pythonhosted.org/packages/source/d/discid/discid-%{version}.tar.gz
BuildRequires:  pkgconfig
# (full) python3 only required for hashlib in openSUSE 12
BuildRequires:  python3
BuildRequires:  python3-devel >= 3.1
BuildRequires:  pkgconfig(libdiscid) >= 0.2.2
# python3-base would be normal Requires, but openSUSE 12 needs this for hashlib
Requires:       python3
BuildArch:      noarch
# no automatic requires since libdiscid is not linked
%if !0%{?fedora_version}
Requires:       %(rpm -qf $(readlink -qne %{_libdir}/libdiscid.so) --qf '%{NAME} >= %{VERSION}')
%else
Requires:       python3-libdiscid
%endif

%description
Python-discid implements Python bindings for MusicBrainz Libdiscid.

Libdiscid's main purpose is the calculation of an identifier of audio
discs (disc ID) to use for the MusicBrainz database.

That identifier is calculated from the TOC of the disc, similar to the
freeDB CDDB identifier. Libdiscid can calculate MusicBrainz disc IDs and
freeDB disc IDs.
Additionally the MCN of the disc and ISRCs from the tracks can be extracted.

This module is a close binding that offloads all relevant data
storage and calculation to Libdiscid. On the other hand it gives a
pythonic API and uses objects and exceptions.

%prep
%setup -q -n discid-%{version}

%build
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod a-x examples.py

%files
%doc COPYING COPYING.LESSER CHANGES.rst examples.py
%{python3_sitelib}/discid-%{version}-py*.egg-info
%dir %{python3_sitelib}/discid
%{python3_sitelib}/discid/

%changelog
openSUSE Build Service is sponsored by