9f93e99
%bcond_without python3
9f93e99
%{!?python3_pkgversion: %global python3_pkgversion 3}
8c70b49
8c70b49
Name:           isrcsubmit
8c70b49
Version:        2.0.1
ce2593d
Release:        7%{?dist}
8c70b49
Summary:        Script to submit ISRCs from disc to MusicBrainz
8c70b49
8c70b49
License:        GPLv3+
8c70b49
URL:            http://jonnyjd.github.io/musicbrainz-isrcsubmit/
8c70b49
Source0:        http://isrcsubmit.jonnyjd.net/downloads/%{name}-%{version}.tar.gz
e87d065
Patch0:         %{name}-2.0.1-no-setup-requires.patch
8c70b49
8c70b49
BuildArch:      noarch
9f93e99
%if %{with python3}
9f93e99
BuildRequires:  python%{python3_pkgversion}-devel
9f93e99
BuildRequires:  python%{python3_pkgversion}-libdiscid
9f93e99
BuildRequires:  python%{python3_pkgversion}-musicbrainzngs
9f93e99
BuildRequires:  python%{python3_pkgversion}-sphinx
9f93e99
Requires:       python%{python3_pkgversion}-libdiscid
9f93e99
Requires:       python%{python3_pkgversion}-musicbrainzngs
9f93e99
Requires:       python%{python3_pkgversion}-keyring
9f93e99
%else
8c70b49
BuildRequires:  python2-devel
8c70b49
BuildRequires:  python-libdiscid
8c70b49
BuildRequires:  python-musicbrainzngs
8c70b49
BuildRequires:  python-sphinx
8c70b49
Requires:       python-libdiscid
8c70b49
Requires:       python-musicbrainzngs
8c70b49
Requires:       python-keyring
9f93e99
%endif
8c70b49
8c70b49
%description
8c70b49
This python script extracts ISRCs from audio cds and submits them to
8c70b49
MusicBrainz. Features: read and submit ISRCs from disc, search for
8c70b49
releases with the TOC of the disc, submit discIds / TOCs, display
8c70b49
release information from MusicBrainz, duplicate ISRC detection (local
8c70b49
and on server), keyring support for login information.
8c70b49
8c70b49
8c70b49
%prep
8c70b49
%autosetup
8c70b49
8c70b49
8c70b49
%build
9f93e99
%if %{with python3}
9f93e99
%py3_build
9f93e99
%else
9f93e99
%py2_build
9f93e99
%endif
8c70b49
8c70b49
8c70b49
%install
8c70b49
rm -rf $RPM_BUILD_ROOT
9f93e99
%if %{with python3}
9f93e99
%py3_install
9f93e99
%else
9f93e99
%py2_install
9f93e99
%endif
8c70b49
8c70b49
8c70b49
%check
8c70b49
# sys.stdin.encoding can be None in mock, hence override with PYTHONIOENCODING
9f93e99
export PYTHONIOENCODING=UTF-8
9f93e99
%if %{with python3}
ce2593d
%{__python3} -Wall setup.py test
9f93e99
%else
ce2593d
%{__python2} -Wall setup.py test
9f93e99
%endif
8c70b49
8c70b49
8c70b49
%files
8c70b49
%license COPYING
8c70b49
%doc AUTHORS CHANGES.markdown README.rst
8c70b49
%{_bindir}/isrcsubmit.py
9f93e99
%if %{with python3}
9f93e99
%{python3_sitelib}/%{name}-%{version}*
9f93e99
%else
8c70b49
%{python2_sitelib}/%{name}-%{version}*
9f93e99
%endif
8c70b49
%{_mandir}/man1/isrcsubmit.1*
8c70b49
%{_mandir}/man5/isrcsubmit-config.5*
8c70b49
8c70b49
8c70b49
8c70b49
%changelog
ce2593d
* Fri May 26 2017 Ville Skyttä <ville.skytta@iki.fi> - 2.0.1-7
ce2593d
- Run tests with -Wall
ce2593d
- Drop obsolete build conditionals
ce2593d
b4fbd11
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-6
b4fbd11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b4fbd11
9327343
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-5
9327343
- Rebuild for Python 3.6
9327343
bb28b3d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-4
bb28b3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bb28b3d
9f93e99
* Fri Dec  4 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.0.1-3
9f93e99
- Use Python 3 on F-23+
9f93e99
e87d065
* Mon Jun 29 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.0.1-2
e87d065
- Do not try to download any packages during build
e87d065
8c70b49
* Tue Jun 16 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.0.1-1
8c70b49
- Update to 2.0.1
8c70b49
8c70b49
* Sun Apr 19 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.0.0-2
8c70b49
- Add man page, fix and run test suite (#1210941)
8c70b49
8c70b49
* Sat Apr 11 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.0.0-1
8c70b49
- First build