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