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