]> git.pld-linux.org Git - packages/python-discid.git/blame - python-discid.spec
rebuild with python 3.10
[packages/python-discid.git] / python-discid.spec
CommitLineData
c0851a76
JP
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module discid
7Summary: Python binding of Libdiscid
8Name: python-%{module}
9Version: 1.2.0
82d41943 10Release: 3
c0851a76
JP
11License: LGPL v3+
12Group: Libraries/Python
13#Source0Download: https://pypi.org/simple/discid/
14Source0: https://files.pythonhosted.org/packages/source/d/discid/%{module}-%{version}.tar.gz
15# Source0-md5: 88cbe833957062f9cb163a72884931d2
16URL: https://pypi.org/project/discid/
17%if %{with python2}
18BuildRequires: python-devel >= 1:2.6
19%endif
20%if %{with python3}
21BuildRequires: python3-devel >= 1:3.1
22%endif
23BuildRequires: rpm-pythonprov
24BuildRequires: rpmbuild(macros) >= 1.714
25Requires: libdiscid >= 0.2.2
26Requires: python-modules >= 1:2.6
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31Python-discid implements Python bindings for MusicBrainz Libdiscid.
32Libdiscid's main purpose is the calculation of an identifier of audio
33discs (disc ID) to use for the MusicBrainz database.
34
35That identifier is calculated from the TOC of the disc, similar to the
36freeDB CDDB identifier. Libdiscid can calculate MusicBrainz disc IDs
37and freeDB disc IDs. Additionally the MCN of the disc and ISRCs from
38the tracks can be extracted.
39
40%package -n python3-%{module}
41Summary: Python binding of Libdiscid
42Group: Libraries/Python
43Requires: libdiscid >= 0.2.2
44Requires: python3-modules >= 1:3.1
45
46%description -n python3-%{module}
47Python-discid implements Python bindings for MusicBrainz Libdiscid.
48Libdiscid's main purpose is the calculation of an identifier of audio
49discs (disc ID) to use for the MusicBrainz database.
50
51That identifier is calculated from the TOC of the disc, similar to the
52freeDB CDDB identifier. Libdiscid can calculate MusicBrainz disc IDs
53and freeDB disc IDs. Additionally the MCN of the disc and ISRCs from
54the tracks can be extracted.
55
56%prep
57%setup -q -n %{module}-%{version}
58
59%build
60%if %{with python2}
61%py_build
62%endif
63
64%if %{with python3}
65%py3_build
66%endif
67
68%install
69rm -rf $RPM_BUILD_ROOT
70
71%if %{with python2}
72%py_install
73
74%py_postclean
75%endif
76
77%if %{with python3}
78%py3_install
79%endif
80
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%if %{with python2}
86%files
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
92%endif
93
94%if %{with python3}
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
102%endif
This page took 0.110196 seconds and 4 git commands to generate.