]> git.pld-linux.org Git - packages/python-eyeD3.git/blob - python-eyeD3.spec
- remove dependency on optional and dead package, rel 6
[packages/python-eyeD3.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:        6
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-modules >= 1:3.3
72 Requires:       python3-six >= 1.10.0
73
74 %description -n python3-%{module}
75 eyeD3 is a Python module and program for processing ID3 tags.
76 Information about MP3 files (i.e bit rate, sample frequency, play
77 time, etc.) is also provided. The formats supported are ID3 v1.0/v1.1
78 and v2.3/v2.4.
79
80 %description -n python3-%{module} -l pl.UTF-8
81 eyeD3 to moduł języka Python oraz wykorzystujący go program,
82 przetwarzający znaczniki ID3. Dostarczana jest także informacja o
83 samych plikach MP3 (długość, częstotliwość próbkowania itp.).
84 Obsługiwane są znaczniki ID3 w wersjach v1.0/v1.1 i v2.3/v2.4.
85
86 %prep
87 %setup -q -n %{module}-%{version}
88
89 %build
90 export LC_ALL=C.UTF-8
91
92 %if %{with python2}
93 %py_build %{?with_tests:test}
94 %endif
95
96 %if %{with python3}
97 %py3_build %{?with_tests:test}
98 %endif
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python3}
104 %py3_install
105
106 %{__mv} $RPM_BUILD_ROOT%{_bindir}/eyeD3{,-py3}
107 %{!?with_python2:ln -sf eyeD3-py2 $RPM_BUILD_ROOT%{_bindir}/eyeD3}
108 %endif
109
110 %if %{with python2}
111 %py_install
112
113 %py_postclean
114
115 %{__mv} $RPM_BUILD_ROOT%{_bindir}/eyeD3{,-py2}
116 ln -sf eyeD3-py2 $RPM_BUILD_ROOT%{_bindir}/eyeD3
117 %endif
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %if %{with python2}
123 %files
124 %defattr(644,root,root,755)
125 %doc AUTHORS.rst HISTORY.rst README.rst
126 %attr(755,root,root) %{_bindir}/eyeD3-py2
127 %attr(755,root,root) %{_bindir}/eyeD3
128 %{py_sitescriptdir}/eyed3
129 %{py_sitescriptdir}/eyed3-%{version}-py*.egg-info
130 %endif
131
132 %if %{with python3}
133 %files -n python3-%{module}
134 %defattr(644,root,root,755)
135 %doc AUTHORS.rst HISTORY.rst README.rst
136 %attr(755,root,root) %{_bindir}/eyeD3-py3
137 %{py3_sitescriptdir}/eyed3
138 %{py3_sitescriptdir}/eyed3-%{version}-py*.egg-info
139 %if %{without python2}
140 %attr(755,root,root) %{_bindir}/eyeD3
141 %endif
142 %endif
This page took 0.115759 seconds and 4 git commands to generate.