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