]> git.pld-linux.org Git - packages/python-PyQt4.git/blob - python-PyQt4.spec
- updated to 4.12.3
[packages/python-PyQt4.git] / python-PyQt4.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x modules
4 %bcond_without  python3 # CPython 3.x modules
5
6 %define         module  PyQt4
7 # minimal required sip version
8 %define         sip_ver 2:4.19.12
9 # last qt version covered by these bindings (minimal required is currently 4.1.0)
10 %define         qt_ver  4.8.7
11
12 Summary:        Python 2 bindings for the Qt4 toolkit
13 Summary(pl.UTF-8):      Wiązania Pythona 2 do toolkitu Qt4
14 Name:           python-%{module}
15 Version:        4.12.3
16 Release:        1
17 License:        GPL v3
18 Group:          Libraries/Python
19 Source0:        http://downloads.sourceforge.net/pyqt/PyQt4_gpl_x11-%{version}.tar.gz
20 # Source0-md5:  f7b106c39ec16ade9b0f86e570bfe712
21 Patch0:         %{name}-dbuspath.patch
22 Patch1:         %{name}-64bit.patch
23 URL:            https://riverbankcomputing.com/software/pyqt/intro
24 # most of BR comes from configure.py
25 BuildRequires:  QtAssistant-compat-devel >= 4.6.3
26 BuildRequires:  QtCore-devel >= %{qt_ver}
27 BuildRequires:  QtDBus-devel >= %{qt_ver}
28 BuildRequires:  QtDeclarative-devel >= %{qt_ver}
29 BuildRequires:  QtDesigner-devel >= %{qt_ver}
30 BuildRequires:  QtGui-devel >= %{qt_ver}
31 BuildRequires:  QtHelp-devel >= %{qt_ver}
32 BuildRequires:  QtMultimedia-devel >= %{qt_ver}
33 BuildRequires:  QtNetwork-devel >= %{qt_ver}
34 BuildRequires:  QtOpenGL-devel >= %{qt_ver}
35 BuildRequires:  QtScript-devel >= %{qt_ver}
36 BuildRequires:  QtScriptTools-devel >= %{qt_ver}
37 BuildRequires:  QtSql-devel >= %{qt_ver}
38 BuildRequires:  QtSvg-devel >= %{qt_ver}
39 BuildRequires:  QtTest-devel >= %{qt_ver}
40 BuildRequires:  QtWebKit-devel >= %{qt_ver}
41 BuildRequires:  QtXml-devel >= %{qt_ver}
42 BuildRequires:  QtXmlPatterns-devel >= %{qt_ver}
43 BuildRequires:  phonon-devel
44 BuildRequires:  pkgconfig
45 BuildRequires:  python-dbus-devel >= 0.80
46 %if %{with python2}
47 BuildRequires:  python-dbus >= 0.80
48 BuildRequires:  python-sip-devel >= %{sip_ver}
49 %endif
50 %if %{with python3}
51 BuildRequires:  python3-dbus >= 0.80
52 BuildRequires:  python3-sip-devel >= %{sip_ver}
53 %endif
54 BuildRequires:  qt4-build >= 4.3.3-3
55 BuildRequires:  qt4-qmake >= 4.3.3-3
56 BuildRequires:  rpm-pythonprov
57 BuildRequires:  rpmbuild(macros) >= 1.219
58 Requires:       python-libs
59 Requires:       python-dbus >= 0.80
60 Requires:       python-sip >= %{sip_ver}
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %define         _sipfilesdir    %{_datadir}/sip
64
65 %description
66 PyQt4 is a set of Python bindings for the Qt4 toolkit. The bindings
67 are implemented as a set of Python modules: QtCore, QtDeclarative,
68 QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL,
69 QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml,
70 QtXmlPatterns and phonon.
71
72 This package contains Python 2 bindings.
73
74 %description -l pl.UTF-8
75 PyQt4 to zbiór wiązań Qt4 dla Pythona. Dowiązania zostały
76 zaimplementowane jako moduły Pythona: QtCore, QtDeclarative,
77 QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL,
78 QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml,
79 QtXmlPatterns oraz phonon.
80
81 Ten pakiet zawiera wiązania Pythona 2.
82
83 %package uic
84 Summary:        pyuic4 development tool for Python 2
85 Summary(pl.UTF-8):      Narzędzie programistyczne pyuic4 dla Pythona 2
86 Group:          Development/Tools
87 Requires:       %{name} = %{version}-%{release}
88
89 %description uic
90 pyuic4 development tool for Python 2.
91
92 %description uic -l pl.UTF-8
93 Narzędzie programistyczne pyuic4 dla Pythona 2.
94
95 %package -n python3-PyQt4
96 Summary:        Python 2 bindings for the Qt4 toolkit
97 Summary(pl.UTF-8):      Wiązania Pythona 2 do toolkitu Qt4
98 Group:          Libraries/Python
99 Requires:       python3-libs
100 Requires:       python3-dbus >= 0.80
101 Requires:       python3-sip >= %{sip_ver}
102
103 %description -n python3-PyQt4
104 PyQt4 is a set of Python bindings for the Qt4 toolkit. The bindings
105 are implemented as a set of Python modules: QtCore, QtDeclarative,
106 QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL,
107 QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml,
108 QtXmlPatterns and phonon.
109
110 This package contains Python 3 bindings.
111
112 %description -n python3-PyQt4 -l pl.UTF-8
113 PyQt4 to zbiór wiązań Qt4 dla Pythona. Dowiązania zostały
114 zaimplementowane jako moduły Pythona: QtCore, QtDeclarative,
115 QtDesigner, QtGui, QtHelp, QtMultimedia, QtNetwork, QtOpenGL,
116 QtScript, QtScriptTools, QtSql, QtSvg, QtTest, QtWebKit, QtXml,
117 QtXmlPatterns oraz phonon.
118
119 Ten pakiet zawiera wiązania Pythona 3.
120
121 %package -n python3-PyQt4-uic
122 Summary:        pyuic4 development tool for Python 3
123 Summary(pl.UTF-8):      Narzędzie programistyczne pyuic4 dla Pythona 3
124 Group:          Development/Tools
125 Requires:       python3-PyQt4 = %{version}-%{release}
126
127 %description -n python3-PyQt4-uic
128 pyuic4 development tool for Python 3.
129
130 %description -n python3-PyQt4-uic -l pl.UTF-8
131 Narzędzie programistyczne pyuic4 dla Pythona 3.
132
133 %package devel-tools
134 Summary:        PyQt4 development tools
135 Summary(pl.UTF-8):      Narzędzia programistyczne PyQt4
136 Group:          Development/Tools
137 Requires:       QtCore >= %{qt_ver}
138 Requires:       QtXml >= %{qt_ver}
139
140 %description devel-tools
141 PyQt4 development tools: pylupdate4, pyrcc4.
142
143 Note: this package doesn't depend on Python version.
144
145 %description devel-tools -l pl.UTF-8
146 Narzędzia programistyczne PyQt4: pylupdate4, pyrcc4.
147
148 Uwaga: ten pakiet nie jest zależny od wersji Pythona.
149
150 %package examples
151 Summary:        Examples for PyQt4
152 Summary(pl.UTF-8):      Przykłady do PyQt4
153 Group:          Libraries/Python
154 Requires:       %{name} = %{version}-%{release}
155
156 %description examples
157 Examples code demonstrating how to use the Python bindings for Qt4.
158
159 %description examples -l pl.UTF-8
160 Przykładowy kod demonstrujący jak używać PyQt4.
161
162 %package -n sip-PyQt4
163 Summary:        SIP files needed to build other bindings based on Qt4
164 Summary(pl.UTF-8):      Pliki SIP potrzebne do budowania innych wiązań opartych na Qt4
165 Group:          Development/Languages/Python
166 Requires:       sip >= %{sip_ver}
167 Obsoletes:      python-PyQt4-devel < 4.11.3-2
168
169 %description -n sip-PyQt4
170 SIP files needed to build other bindings for C++ classes that inherit
171 from any of the Qt4 classes (e.g. KDE or your own).
172
173 %description -n sip-PyQt4 -l pl.UTF-8
174 Pliki SIP potrzebne do budowania innych wiązań do klas C++
175 dziedziczących z dowolnej klasy Qt4 (np. KDE lub własnych).
176
177 %package -n QtDesigner-plugin-pyqt4
178 Summary:        Qt Designer plugin for Python plugins with widgets
179 Summary(pl.UTF-8):      Wtyczka Qt Designera dla wtyczek Pythona zawierających widgety
180 # can build only for one python version
181 %if %{with python2}
182 Requires:       %{name} = %{version}-%{release}
183 %else
184 Requires:       python3-PyQt4 = %{version}-%{release}
185 %endif
186
187 %description -n QtDesigner-plugin-pyqt4
188 This is the Qt Designer plugin that collects all the Python plugins it
189 can find as a widget collection to Designer.
190
191 %description -n QtDesigner-plugin-pyqt4 -l pl.UTF-8
192 Ten pakiet zawiera wtyczkę Qt Designera zbierającą wszystkie wtyczki
193 Pythona, które jest w stanie znaleźć, jako zestaw widgetów dla
194 Designera.
195
196 %package -n qscintilla2-%{module}-api
197 Summary:        PyQt4 API file for QScintilla
198 Summary(pl.UTF-8):      Plik API PyQt4 dla QScintilli
199 Group:          Libraries/Python
200 Requires:       qscintilla2-qt4 >= 2.8.4
201
202 %description -n qscintilla2-%{module}-api
203 PyQt4 API file can be used by the QScintilla editor component to
204 enable the use of auto-completion and call tips when editing PyQt4
205 code.
206
207 %description -n qscintilla2-%{module}-api -l pl.UTF-8
208 Plik API PyQt4 może być używany przez komponent edytora QScintilla aby
209 umożliwić automatyczne dopełnianie i podpowiedzi przy modyfikowaniu
210 kodu wykorzystującego PyQt4.
211
212 %prep
213 %setup -q -n PyQt4_gpl_x11-%{version}
214 # small hack to build for shared libs - symbol QT_SHARED not defined anymore?
215 %{__sed} -i 's/qt_shared = lines\[.*\]/qt_shared = "y"/' configure.py
216 %{__sed} -i 's/resp = sys.stdin.readline.*/resp = "yes"/' configure.py
217 %patch0 -p1
218 %patch1 -p1
219
220 %build
221 %if %{with python2}
222 install -d build-py2
223 cd build-py2
224 %{__python} ../configure.py \
225         --confirm-license \
226         -c -j 3 \
227         -a \
228         -b %{_bindir} \
229         -d %{py_sitedir} \
230         -q "%{_bindir}/qmake-qt4" \
231         -v %{_sipfilesdir}/%{module} \
232         --dbus-path="%{py_sitedir}/dbus/mainloop" \
233         LIBDIR_QT="%{_libdir}" \
234         CC="%{__cc}" \
235         CXX="%{__cxx}"
236
237 %{__make}
238 cd ..
239 %endif
240
241 %if %{with python3}
242 install -d build-py3
243 cd build-py3
244 %{__python3} ../configure.py \
245         --confirm-license \
246         -c -j 3 \
247         -a \
248         -b %{_bindir} \
249         -d %{py3_sitedir} \
250         -q "%{_bindir}/qmake-qt4" \
251         -v %{_sipfilesdir}/%{module} \
252         --dbus-path="%{py3_sitedir}/dbus/mainloop" \
253         LIBDIR_QT="%{_libdir}" \
254         CC="%{__cc}" \
255         CXX="%{__cxx}"
256
257 %{__make}
258 cd ..
259 %endif
260
261 %install
262 rm -rf $RPM_BUILD_ROOT
263 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
264
265 %if %{with python3}
266 %{__make} -C build-py3 install \
267         DESTDIR=$RPM_BUILD_ROOT \
268         INSTALL_ROOT=$RPM_BUILD_ROOT
269
270 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyuic4{,-3}
271
272 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
273 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
274 %endif
275
276 %if %{with python2}
277 %{__make} -C build-py2 install \
278         DESTDIR=$RPM_BUILD_ROOT \
279         INSTALL_ROOT=$RPM_BUILD_ROOT
280
281 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
282 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
283
284 # don't use py_postclean, leave *.py in %{py_sitedir}/PyQt4/uic/widget-plugins
285 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/*.py
286 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/*.py
287 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/Compiler/*.py
288 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/Loader/*.py
289 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/port_v2/*.py
290 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/PyQt4/uic/port_v3/*.py
291
292 %{__sed} -i 's,pyuic.py,pyuic.pyc,' $RPM_BUILD_ROOT%{_bindir}/pyuic4
293 %endif
294
295 cp -R examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
296
297 %clean
298 rm -rf $RPM_BUILD_ROOT
299
300 %if %{with python2}
301 %files
302 %defattr(644,root,root,755)
303 %doc NEWS README THANKS
304 %dir %{py_sitedir}/PyQt4
305 %attr(755,root,root) %{py_sitedir}/PyQt4/Qt.so
306 %attr(755,root,root) %{py_sitedir}/PyQt4/QtAssistant.so
307 %attr(755,root,root) %{py_sitedir}/PyQt4/QtCore.so
308 %attr(755,root,root) %{py_sitedir}/PyQt4/QtDBus.so
309 %attr(755,root,root) %{py_sitedir}/PyQt4/QtDeclarative.so
310 %attr(755,root,root) %{py_sitedir}/PyQt4/QtDesigner.so
311 %attr(755,root,root) %{py_sitedir}/PyQt4/QtGui.so
312 %attr(755,root,root) %{py_sitedir}/PyQt4/QtHelp.so
313 %attr(755,root,root) %{py_sitedir}/PyQt4/QtMultimedia.so
314 %attr(755,root,root) %{py_sitedir}/PyQt4/QtNetwork.so
315 %attr(755,root,root) %{py_sitedir}/PyQt4/QtOpenGL.so
316 %attr(755,root,root) %{py_sitedir}/PyQt4/QtScript.so
317 %attr(755,root,root) %{py_sitedir}/PyQt4/QtScriptTools.so
318 %attr(755,root,root) %{py_sitedir}/PyQt4/QtSql.so
319 %attr(755,root,root) %{py_sitedir}/PyQt4/QtSvg.so
320 %attr(755,root,root) %{py_sitedir}/PyQt4/QtTest.so
321 %attr(755,root,root) %{py_sitedir}/PyQt4/QtWebKit.so
322 %attr(755,root,root) %{py_sitedir}/PyQt4/QtXml.so
323 %attr(755,root,root) %{py_sitedir}/PyQt4/QtXmlPatterns.so
324 %attr(755,root,root) %{py_sitedir}/PyQt4/phonon.so
325 %{py_sitedir}/PyQt4/__init__.py[co]
326 %{py_sitedir}/PyQt4/pyqtconfig.py[co]
327 %attr(755,root,root) %{py_sitedir}/dbus/mainloop/qt.so
328
329 %files uic
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_bindir}/pyuic4
332 %{py_sitedir}/PyQt4/uic
333 %endif
334
335 %if %{with python3}
336 %files -n python3-PyQt4
337 %defattr(644,root,root,755)
338 %doc NEWS README THANKS
339 %dir %{py3_sitedir}/PyQt4
340 %attr(755,root,root) %{py3_sitedir}/PyQt4/Qt.so
341 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtAssistant.so
342 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtCore.so
343 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtDBus.so
344 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtDeclarative.so
345 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtDesigner.so
346 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtGui.so
347 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtHelp.so
348 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtMultimedia.so
349 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtNetwork.so
350 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtOpenGL.so
351 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtScript.so
352 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtScriptTools.so
353 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtSql.so
354 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtSvg.so
355 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtTest.so
356 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtWebKit.so
357 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtXml.so
358 %attr(755,root,root) %{py3_sitedir}/PyQt4/QtXmlPatterns.so
359 %attr(755,root,root) %{py3_sitedir}/PyQt4/phonon.so
360 %{py3_sitedir}/PyQt4/__pycache__
361 %{py3_sitedir}/PyQt4/__init__.py
362 %{py3_sitedir}/PyQt4/pyqtconfig.py
363 %attr(755,root,root) %{py3_sitedir}/dbus/mainloop/qt.so
364
365 %files -n python3-PyQt4-uic
366 %defattr(644,root,root,755)
367 %attr(755,root,root) %{_bindir}/pyuic4-3
368 %{py3_sitedir}/PyQt4/uic
369 %endif
370
371 %files devel-tools
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_bindir}/pylupdate4
374 %attr(755,root,root) %{_bindir}/pyrcc4
375
376 %files examples
377 %defattr(644,root,root,755)
378 %{_examplesdir}/%{name}-%{version}
379
380 %files -n sip-PyQt4
381 %defattr(644,root,root,755)
382 %{_sipfilesdir}/PyQt4
383
384 %files -n QtDesigner-plugin-pyqt4
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/qt4/plugins/designer/libpyqt4.so
387
388 %files -n qscintilla2-%{module}-api
389 %defattr(644,root,root,755)
390 %{_datadir}/qt4/qsci/api/python/PyQt4.api
This page took 0.158022 seconds and 3 git commands to generate.