3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 Summary: Python binding of Libdiscid
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/discid/
14 Source0: https://files.pythonhosted.org/packages/source/d/discid/%{module}-%{version}.tar.gz
15 # Source0-md5: 88cbe833957062f9cb163a72884931d2
16 URL: https://pypi.org/project/discid/
18 BuildRequires: python-devel >= 1:2.6
21 BuildRequires: python3-devel >= 1:3.1
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.714
25 Requires: libdiscid >= 0.2.2
26 Requires: python-modules >= 1:2.6
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Python-discid implements Python bindings for MusicBrainz Libdiscid.
32 Libdiscid's main purpose is the calculation of an identifier of audio
33 discs (disc ID) to use for the MusicBrainz database.
35 That identifier is calculated from the TOC of the disc, similar to the
36 freeDB CDDB identifier. Libdiscid can calculate MusicBrainz disc IDs
37 and freeDB disc IDs. Additionally the MCN of the disc and ISRCs from
38 the tracks can be extracted.
40 %package -n python3-%{module}
41 Summary: Python binding of Libdiscid
42 Group: Libraries/Python
43 Requires: libdiscid >= 0.2.2
44 Requires: python3-modules >= 1:3.1
46 %description -n python3-%{module}
47 Python-discid implements Python bindings for MusicBrainz Libdiscid.
48 Libdiscid's main purpose is the calculation of an identifier of audio
49 discs (disc ID) to use for the MusicBrainz database.
51 That identifier is calculated from the TOC of the disc, similar to the
52 freeDB CDDB identifier. Libdiscid can calculate MusicBrainz disc IDs
53 and freeDB disc IDs. Additionally the MCN of the disc and ISRCs from
54 the tracks can be extracted.
57 %setup -q -n %{module}-%{version}
69 rm -rf $RPM_BUILD_ROOT
83 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
88 %doc CHANGES.rst README.rst
89 %dir %{py_sitescriptdir}/%{module}
90 %{py_sitescriptdir}/%{module}/*.py[co]
91 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
95 %files -n python3-%{module}
96 %defattr(644,root,root,755)
97 %doc CHANGES.rst README.rst
98 %dir %{py3_sitescriptdir}/%{module}
99 %{py3_sitescriptdir}/%{module}/*.py
100 %{py3_sitescriptdir}/%{module}/__pycache__
101 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info