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