]> git.pld-linux.org Git - SPECS.git/blob - python-eyeD3.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / python-eyeD3.spec
1 # TODO
2 # -     python2 requires pathlib
3 #
4 # Conditional build:
5 %bcond_with     tests   # unit tests
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_without  python3 # CPython 3.x module
8
9 %define         module  eyeD3
10 Summary:        Python 2 module for manipulating ID3 informational tags on MP3 audio files
11 Summary(pl.UTF-8):      Moduł Pythona 2 służący do operacji na znacznikach ID3 plików MP3
12 Name:           python-%{module}
13 Version:        0.9.6
14 Release:        1
15 License:        GPL v3
16 Group:          Development/Languages/Python
17 Source0:        http://eyed3.nicfit.net/releases/%{module}-%{version}.tar.gz
18 # Source0-md5:  4e5ee817d59ad94a39301ee981171990
19 URL:            http://eyed3.nicfit.net/
20 %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
21 BuildRequires:  glibc-localedb-all
22 %endif
23 BuildRequires:  rpmbuild(macros) >= 1.714
24 %if %{with python2}
25 BuildRequires:  python-devel >= 1:2.7
26 BuildRequires:  python-modules >= 1:2.7
27 %if %{with tests}
28 BuildRequires:  python-factory-boy >= 2.8.1
29 BuildRequires:  python-nose >= 1.3.7
30 BuildRequires:  python-pytest >= 3.0.7
31 BuildRequires:  python-pytest-cov >= 2.5.1
32 BuildRequires:  python-pytest-runner >= 2.11.1
33 BuildRequires:  python-six >= 1.10.0
34 %endif
35 %endif
36 %if %{with python2}
37 BuildRequires:  python3-devel >= 1:3.3
38 BuildRequires:  python3-modules >= 1:3.3
39 %if %{with tests}
40 BuildRequires:  python3-factory-boy >= 2.8.1
41 BuildRequires:  python3-nose >= 1.3.7
42 BuildRequires:  python3-pytest >= 3.0.7
43 BuildRequires:  python3-pytest-cov >= 2.5.1
44 BuildRequires:  python3-pytest-runner >= 2.11.1
45 BuildRequires:  python3-six >= 1.10.0
46 %endif
47 %endif
48 BuildRequires:  rpm-pythonprov
49 Requires:       python-modules >= 1:2.7
50 Requires:       python-six >= 1.10.0
51 Obsoletes:      python-eyeD3-apidocs < 0.9.6
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 eyeD3 is a Python module and program for processing ID3 tags.
57 Information about MP3 files (i.e bit rate, sample frequency, play
58 time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
59 and v2.3/v2.4.
60
61 %description -l pl.UTF-8
62 eyeD3 to moduł języka Python oraz wykorzystujący go program,
63 przetwarzający znaczniki ID3. Dostarczana jest także informacja o
64 samych plikach MP3 (długość, częstotliwość próbkowania itp.).
65 Obsługiwane są znaczniki ID3 w wersjach v1.0/v1.1 i v2.3/v2.4.
66
67 %package -n python3-%{module}
68 Summary:        Python 3 module for manipulating ID3 informational tags on MP3 audio files
69 Summary(pl.UTF-8):      Moduł Pythona 3 służący do operacji na znacznikach ID3 plików MP3
70 Group:          Development/Languages/Python
71 Requires:       python3-grako
72 Requires:       python3-modules >= 1:3.3
73 Requires:       python3-six >= 1.10.0
74
75 %description -n python3-%{module}
76 eyeD3 is a Python module and program for processing ID3 tags.
77 Information about MP3 files (i.e bit rate, sample frequency, play
78 time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
79 and v2.3/v2.4.
80
81 %description -n python3-%{module} -l pl.UTF-8
82 eyeD3 to moduł języka Python oraz wykorzystujący go program,
83 przetwarzający znaczniki ID3. Dostarczana jest także informacja o
84 samych plikach MP3 (długość, częstotliwość próbkowania itp.).
85 Obsługiwane są znaczniki ID3 w wersjach v1.0/v1.1 i v2.3/v2.4.
86
87 %prep
88 %setup -q -n %{module}-%{version}
89
90 %build
91 export LC_ALL=C.UTF-8
92
93 %if %{with python2}
94 %py_build %{?with_tests:test}
95 %endif
96
97 %if %{with python3}
98 %py3_build %{?with_tests:test}
99 %endif
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python3}
105 %py3_install
106
107 %{__mv} $RPM_BUILD_ROOT%{_bindir}/eyeD3{,-py3}
108 %{!?with_python2:ln -sf eyeD3-py2 $RPM_BUILD_ROOT%{_bindir}/eyeD3}
109 %endif
110
111 %if %{with python2}
112 %py_install
113
114 %py_postclean
115
116 %{__mv} $RPM_BUILD_ROOT%{_bindir}/eyeD3{,-py2}
117 ln -sf eyeD3-py2 $RPM_BUILD_ROOT%{_bindir}/eyeD3
118 %endif
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %if %{with python2}
124 %files
125 %defattr(644,root,root,755)
126 %doc AUTHORS.rst HISTORY.rst README.rst
127 %attr(755,root,root) %{_bindir}/eyeD3-py2
128 %attr(755,root,root) %{_bindir}/eyeD3
129 %{py_sitescriptdir}/eyed3
130 %{py_sitescriptdir}/eyed3-%{version}-py*.egg-info
131 %endif
132
133 %if %{with python3}
134 %files -n python3-%{module}
135 %defattr(644,root,root,755)
136 %doc AUTHORS.rst HISTORY.rst README.rst
137 %attr(755,root,root) %{_bindir}/eyeD3-py3
138 %{py3_sitescriptdir}/eyed3
139 %{py3_sitescriptdir}/eyed3-%{version}-py*.egg-info
140 %if %{without python2}
141 %attr(755,root,root) %{_bindir}/eyeD3
142 %endif
143 %endif
This page took 0.079208 seconds and 3 git commands to generate.