]> git.pld-linux.org Git - packages/python-discid.git/blob - python-discid.spec
4e41e991fed561429cefd0de29769ae788cbfe21
[packages/python-discid.git] / python-discid.spec
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
7 Summary:        Python binding of Libdiscid
8 Name:           python-%{module}
9 Version:        1.2.0
10 Release:        2
11 License:        LGPL v3+
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/
17 %if %{with python2}
18 BuildRequires:  python-devel >= 1:2.6
19 %endif
20 %if %{with python3}
21 BuildRequires:  python3-devel >= 1:3.1
22 %endif
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 Requires:       libdiscid >= 0.2.2
26 Requires:       python-modules >= 1:2.6
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
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.
34
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.
39
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
45
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.
50
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.
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
69 rm -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
83 rm -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.069764 seconds and 2 git commands to generate.