]>
Commit | Line | Data |
---|---|---|
c9876ce7 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with enginio # Qt5Enginio support | |
4 | %bcond_without webkit # Qt5WebKit support | |
5 | ||
6 | %define module PyQt5 | |
7 | # minimal required sip version | |
8 | %define sip_ver 6.4 | |
9 | # last qt version covered by these bindings (minimal required is currently 5.0.0) | |
10 | # %define qt_ver %{version} | |
11 | %define qt_ver 5.15.0 | |
12 | %define qtenginio_ver 1:1.6.0 | |
13 | ||
14 | Summary: Python bindings for the Qt5 toolkit | |
15 | Summary(pl.UTF-8): Wiązania Pythona do toolkitu Qt5 | |
16 | Name: python3-%{module} | |
ec412b76 JP |
17 | Version: 5.15.8 |
18 | Release: 1 | |
c9876ce7 JR |
19 | License: GPL v3 |
20 | Group: Libraries/Python | |
21 | #Source0Download: https://pypi.org/simple/PyQt5/ | |
22 | Source0: https://files.pythonhosted.org/packages/source/P/PyQt5/PyQt5-%{version}.tar.gz | |
ec412b76 | 23 | # Source0-md5: dab5df4f1e724f42af62542ade5124c7 |
c9876ce7 JR |
24 | URL: https://riverbankcomputing.com/software/pyqt/intro |
25 | # most of BR comes from configure.py | |
26 | BuildRequires: Qt5Bluetooth-devel >= %{qt_ver} | |
27 | BuildRequires: Qt5Core-devel >= %{qt_ver} | |
28 | BuildRequires: Qt5DBus-devel >= %{qt_ver} | |
29 | BuildRequires: Qt5Designer-devel >= %{qt_ver} | |
30 | %{?with_enginio:BuildRequires: Qt5Enginio-devel >= %{qtenginio_ver}} | |
31 | BuildRequires: Qt5Gui-devel >= %{qt_ver} | |
32 | BuildRequires: Qt5Help-devel >= %{qt_ver} | |
33 | BuildRequires: Qt5Location-devel >= %{qt_ver} | |
34 | BuildRequires: Qt5Multimedia-devel >= %{qt_ver} | |
35 | BuildRequires: Qt5MultimediaWidgets-devel >= %{qt_ver} | |
36 | BuildRequires: Qt5Network-devel >= %{qt_ver} | |
37 | BuildRequires: Qt5Nfc-devel >= %{qt_ver} | |
38 | BuildRequires: Qt5OpenGL-devel >= %{qt_ver} | |
39 | BuildRequires: Qt5Positioning-devel >= %{qt_ver} | |
40 | BuildRequires: Qt5PrintSupport-devel | |
c9876ce7 JR |
41 | BuildRequires: Qt5Qml-devel >= %{qt_ver} |
42 | BuildRequires: Qt5Quick-devel >= %{qt_ver} | |
43 | BuildRequires: Qt5Quick3D-devel >= %{qt_ver} | |
1483d3da | 44 | BuildRequires: Qt5RemoteObjects-devel >= %{qt_ver} |
c9876ce7 JR |
45 | BuildRequires: Qt5Sensors-devel >= %{qt_ver} |
46 | BuildRequires: Qt5SerialPort-devel >= %{qt_ver} | |
47 | BuildRequires: Qt5Sql-devel >= %{qt_ver} | |
48 | BuildRequires: Qt5Svg-devel >= %{qt_ver} | |
49 | BuildRequires: Qt5Test-devel >= %{qt_ver} | |
50 | BuildRequires: Qt5UiTools-devel >= %{qt_ver} | |
51 | BuildRequires: Qt5WebChannel-devel >= %{qt_ver} | |
52 | %{?with_webkit:BuildRequires: Qt5WebKit-devel >= %{qt_ver}} | |
53 | BuildRequires: Qt5WebSockets-devel >= %{qt_ver} | |
54 | BuildRequires: Qt5Widgets-devel >= %{qt_ver} | |
55 | BuildRequires: Qt5X11Extras-devel >= %{qt_ver} | |
56 | BuildRequires: Qt5Xml-devel >= %{qt_ver} | |
57 | BuildRequires: Qt5XmlPatterns-devel >= %{qt_ver} | |
58 | BuildRequires: dbus-devel >= 1 | |
59 | BuildRequires: pkgconfig | |
60 | BuildRequires: python-dbus-devel >= 0.80 | |
1483d3da | 61 | BuildRequires: python3-PyQt-builder |
c9876ce7 | 62 | BuildRequires: python3-dbus >= 0.80 |
62434728 | 63 | BuildRequires: python3-devel |
c9876ce7 JR |
64 | BuildRequires: qt5-build >= %{qt_ver} |
65 | BuildRequires: qt5-qmake >= %{qt_ver} | |
3950c763 | 66 | BuildRequires: rpm-build >= 4.6 |
c9876ce7 | 67 | BuildRequires: rpm-pythonprov |
b8f80944 | 68 | BuildRequires: rpmbuild(macros) >= 2.016 |
c9876ce7 JR |
69 | BuildRequires: sip6 >= %{sip_ver} |
70 | Requires: python3-dbus >= 0.80 | |
71 | Requires: python3-libs | |
bb3b9fa3 | 72 | Obsoletes: python-PyQt5 < 5.15.7-1 |
c9876ce7 JR |
73 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
74 | ||
75 | %description | |
76 | PyQt5 is a set of Python bindings for the Qt5 toolkit. The bindings | |
77 | are implemented as a set of Python modules: Qt, QtBluetooth, QtCore, | |
78 | QtDBus, QtDesigner, QtGui, QtHelp, QtLocation, QtMultimedia, | |
79 | QtMultimediaWidgets, QtNetwork, QtNfc, QtOpenGL, QtPositioning, | |
80 | QtPrintSupport, QtQml, QtQuick, QtQuickWidgets, QtSensors, | |
1483d3da JP |
81 | QtSerialPort, QtSql, QtSvg, QtTest, QtWebChannel, QtWebSockets, |
82 | QtX11Extras and QtXmlPatterns. | |
c9876ce7 JR |
83 | |
84 | %description -l pl.UTF-8 | |
85 | PyQt5 to zbiór dowiązań do Qt5 dla Pythona. Dowiązania zostały | |
86 | zaimplementowane jako moduły Pythona: Qt, QtBluetooth, QtCore, QtDBus, | |
87 | QtDesigner, QtGui, QtHelp, QtLocation, QtMultimedia, | |
88 | QtMultimediaWidgets, QtNetwork, QtNfc, QtOpenGL, QtPositioning, | |
89 | QtPrintSupport, QtQml, QtQuick, QtQuickWidgets, QtSensors, | |
1483d3da JP |
90 | QtSerialPort, QtSql, QtSvg, QtTest, QtWebChannel, QtWebSockets, |
91 | QtX11Extras oraz QtXmlPatterns. | |
c9876ce7 JR |
92 | |
93 | %package uic | |
94 | Summary: pyuic5 development tool for Python | |
95 | Summary(pl.UTF-8): Narzędzie programistyczne pyuic5 dla Pythona | |
96 | Group: Development/Tools | |
1483d3da | 97 | Requires: %{name} = %{version}-%{release} |
c9876ce7 JR |
98 | Requires: Qt5Core >= %{qt_ver} |
99 | Requires: Qt5Xml >= %{qt_ver} | |
bb3b9fa3 | 100 | Obsoletes: python-PyQt5-uic < 5.15.7-1 |
c9876ce7 JR |
101 | |
102 | %description uic | |
103 | pyuic5 development tool for Python. | |
104 | ||
105 | %description uic -l pl.UTF-8 | |
106 | Narzędzie programistyczne pyuic5 dla Pythona. | |
107 | ||
108 | %package devel-tools | |
109 | Summary: PyQt5 development tools | |
110 | Summary(pl.UTF-8): Narzędzia programistyczne PyQt5 | |
111 | Group: Development/Tools | |
112 | Requires: python3-PyQt5 = %{version}-%{release} | |
bb3b9fa3 | 113 | Obsoletes: python-PyQt5-devel-tools < 5.15.7-1 |
c9876ce7 JR |
114 | |
115 | %description devel-tools | |
116 | PyQt5 development tools: pylupdate5, pyrcc5. | |
117 | ||
118 | Note: this package doesn't depend on Python version. | |
119 | ||
120 | %description devel-tools -l pl.UTF-8 | |
121 | Narzędzia programistyczne PyQt5: pylupdate5, pyrcc5. | |
122 | ||
123 | Uwaga: ten pakiet nie jest zależny od wersji Pythona. | |
124 | ||
125 | %package examples | |
126 | Summary: Examples for PyQt5 | |
127 | Summary(pl.UTF-8): Przykłady do PyQt5 | |
128 | Group: Libraries/Python | |
129 | Requires: %{name} = %{version}-%{release} | |
3950c763 | 130 | BuildArch: noarch |
c9876ce7 JR |
131 | |
132 | %description examples | |
133 | Examples code demonstrating how to use the Python bindings for Qt5. | |
134 | ||
135 | %description examples -l pl.UTF-8 | |
136 | Przykładowy kod demonstrujący jak używać PyQt5. | |
137 | ||
138 | %package -n sip-PyQt5 | |
139 | Summary: SIP files needed to build other bindings based on Qt5 | |
140 | Summary(pl.UTF-8): Pliki SIP potrzebne do budowania innych wiązań opartych na Qt5 | |
141 | Group: Development/Languages/Python | |
142 | Requires: sip6 >= %{sip_ver} | |
143 | Obsoletes: python-PyQt5-devel < 5.3.2-4 | |
144 | ||
145 | %description -n sip-PyQt5 | |
146 | SIP files needed to build other bindings for C++ classes that inherit | |
147 | from any of the Qt5 classes (e.g. KDE or your own). | |
148 | ||
149 | %description -n sip-PyQt5 -l pl.UTF-8 | |
150 | Pliki SIP potrzebne do budowania innych wiązań do klas C++ | |
151 | dziedziczących z dowolnej klasy Qt5 (np. KDE lub własnych). | |
152 | ||
153 | %package -n Qt5Designer-plugin-pyqt5 | |
154 | Summary: Qt5 Designer plugin for Python plugins with widgets | |
155 | Summary(pl.UTF-8): Wtyczka Qt5 Designera dla wtyczek Pythona zawierających widgety | |
156 | Requires: python3-PyQt5 = %{version}-%{release} | |
157 | ||
158 | %description -n Qt5Designer-plugin-pyqt5 | |
159 | This is the Qt5 Designer plugin that collects all the Python plugins | |
160 | it can find as a widget collection to Designer. | |
161 | ||
162 | %description -n Qt5Designer-plugin-pyqt5 -l pl.UTF-8 | |
163 | Ten pakiet zawiera wtyczkę Qt5 Designera zbierającą wszystkie wtyczki | |
164 | Pythona, które jest w stanie znaleźć, jako zestaw widgetów dla | |
165 | Designera. | |
166 | ||
c9876ce7 JR |
167 | %prep |
168 | %setup -q -n PyQt5-%{version} | |
169 | ||
170 | grep -rl /usr/bin/env examples | xargs sed -i -e '1{ | |
171 | s,^#!.*bin/env python$,#!%{__python3}, | |
172 | }' | |
173 | ||
174 | %build | |
175 | sip-build --build-dir build-py3 \ | |
2d273691 | 176 | --jobs %{__jobs} \ |
c9876ce7 JR |
177 | --verbose \ |
178 | --confirm-license \ | |
2d273691 | 179 | --pep484-pyi \ |
b8f80944 | 180 | --qmake="%{_qt5_qmake}" \ |
c9876ce7 JR |
181 | --scripts-dir=%{_bindir} |
182 | ||
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
186 | ||
187 | %{__make} -C build-py3 install \ | |
188 | DESTDIR=$RPM_BUILD_ROOT \ | |
189 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
190 | ||
191 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
192 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
193 | ||
194 | cp -R examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
195 | ||
196 | %clean | |
197 | rm -rf $RPM_BUILD_ROOT | |
198 | ||
199 | %files | |
200 | %defattr(644,root,root,755) | |
201 | %dir %{_libdir}/qt5/plugins/PyQt5 | |
202 | %attr(755,root,root) %{_libdir}/qt5/plugins/PyQt5/libpyqt5qmlplugin.so | |
203 | %dir %{py3_sitedir}/PyQt5 | |
204 | %attr(755,root,root) %{py3_sitedir}/PyQt5/pylupdate.abi3.so | |
205 | %attr(755,root,root) %{py3_sitedir}/PyQt5/pyrcc.abi3.so | |
206 | %{?with_enginio:%attr(755,root,root) %{py3_sitedir}/PyQt5/Enginio.abi3.so} | |
207 | %attr(755,root,root) %{py3_sitedir}/PyQt5/Qt.abi3.so | |
208 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtBluetooth.abi3.so | |
209 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtCore.abi3.so | |
210 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtDBus.abi3.so | |
211 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtDesigner.abi3.so | |
212 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtGui.abi3.so | |
213 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtHelp.abi3.so | |
214 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtLocation.abi3.so | |
215 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtMultimedia.abi3.so | |
216 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtMultimediaWidgets.abi3.so | |
217 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtNetwork.abi3.so | |
218 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtNfc.abi3.so | |
219 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtOpenGL.abi3.so | |
220 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtPositioning.abi3.so | |
221 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtPrintSupport.abi3.so | |
222 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtQml.abi3.so | |
223 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtQuick.abi3.so | |
224 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtQuick3D.abi3.so | |
225 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtQuickWidgets.abi3.so | |
226 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtRemoteObjects.abi3.so | |
227 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtSensors.abi3.so | |
228 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtSerialPort.abi3.so | |
229 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtSql.abi3.so | |
230 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtSvg.abi3.so | |
231 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtTest.abi3.so | |
232 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebChannel.abi3.so | |
233 | %if %{with webkit} | |
234 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebKit.abi3.so | |
235 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebKitWidgets.abi3.so | |
236 | %endif | |
237 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebSockets.abi3.so | |
238 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWidgets.abi3.so | |
239 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtX11Extras.abi3.so | |
240 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtXml.abi3.so | |
241 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtXmlPatterns.abi3.so | |
242 | %attr(755,root,root) %{py3_sitedir}/PyQt5/_QOpenGLFunctions_2_0.abi3.so | |
243 | %attr(755,root,root) %{py3_sitedir}/PyQt5/_QOpenGLFunctions_2_1.abi3.so | |
244 | %attr(755,root,root) %{py3_sitedir}/PyQt5/_QOpenGLFunctions_4_1_Core.abi3.so | |
245 | %attr(755,root,root) %{py3_sitedir}/dbus/mainloop/pyqt5.abi3.so | |
246 | %{py3_sitedir}/PyQt5/__init__.py | |
247 | %{py3_sitedir}/PyQt5/pylupdate_main.py | |
248 | %{py3_sitedir}/PyQt5/pyrcc_main.py | |
249 | %{py3_sitedir}/PyQt5/__pycache__ | |
250 | ||
2d273691 JR |
251 | # annotations (-devel?) |
252 | %{py3_sitedir}/PyQt5-%{version}.dist-info | |
253 | %{?with_enginio:%{py3_sitedir}/PyQt5/Enginio.pyi} | |
254 | %{py3_sitedir}/PyQt5/QtBluetooth.pyi | |
255 | %{py3_sitedir}/PyQt5/QtCore.pyi | |
256 | %{py3_sitedir}/PyQt5/QtDBus.pyi | |
257 | %{py3_sitedir}/PyQt5/QtDesigner.pyi | |
258 | %{py3_sitedir}/PyQt5/QtGui.pyi | |
259 | %{py3_sitedir}/PyQt5/QtHelp.pyi | |
260 | %{py3_sitedir}/PyQt5/QtLocation.pyi | |
261 | %{py3_sitedir}/PyQt5/QtMultimedia.pyi | |
262 | %{py3_sitedir}/PyQt5/QtMultimediaWidgets.pyi | |
263 | %{py3_sitedir}/PyQt5/QtNetwork.pyi | |
264 | %{py3_sitedir}/PyQt5/QtNfc.pyi | |
265 | %{py3_sitedir}/PyQt5/QtOpenGL.pyi | |
266 | %{py3_sitedir}/PyQt5/QtPositioning.pyi | |
267 | %{py3_sitedir}/PyQt5/QtPrintSupport.pyi | |
268 | %{py3_sitedir}/PyQt5/QtQml.pyi | |
269 | %{py3_sitedir}/PyQt5/QtQuick.pyi | |
270 | %{py3_sitedir}/PyQt5/QtQuick3D.pyi | |
271 | %{py3_sitedir}/PyQt5/QtQuickWidgets.pyi | |
272 | %{py3_sitedir}/PyQt5/QtRemoteObjects.pyi | |
273 | %{py3_sitedir}/PyQt5/QtSensors.pyi | |
274 | %{py3_sitedir}/PyQt5/QtSerialPort.pyi | |
275 | %{py3_sitedir}/PyQt5/QtSql.pyi | |
276 | %{py3_sitedir}/PyQt5/QtSvg.pyi | |
277 | %{py3_sitedir}/PyQt5/QtTest.pyi | |
278 | %{py3_sitedir}/PyQt5/QtWebChannel.pyi | |
279 | %if %{with webkit} | |
280 | %{py3_sitedir}/PyQt5/QtWebKit.pyi | |
281 | %{py3_sitedir}/PyQt5/QtWebKitWidgets.pyi | |
282 | %endif | |
283 | %{py3_sitedir}/PyQt5/QtWebSockets.pyi | |
284 | %{py3_sitedir}/PyQt5/QtWidgets.pyi | |
285 | %{py3_sitedir}/PyQt5/QtX11Extras.pyi | |
286 | %{py3_sitedir}/PyQt5/QtXml.pyi | |
287 | %{py3_sitedir}/PyQt5/QtXmlPatterns.pyi | |
288 | %{py3_sitedir}/PyQt5/py.typed | |
289 | ||
c9876ce7 JR |
290 | %files uic |
291 | %defattr(644,root,root,755) | |
292 | %attr(755,root,root) %{_bindir}/pyuic5 | |
293 | %{py3_sitedir}/PyQt5/uic | |
294 | ||
295 | %files devel-tools | |
296 | %defattr(644,root,root,755) | |
297 | %attr(755,root,root) %{_bindir}/pylupdate5 | |
298 | %attr(755,root,root) %{_bindir}/pyrcc5 | |
299 | ||
300 | %files examples | |
301 | %defattr(644,root,root,755) | |
302 | %{_examplesdir}/%{name}-%{version} | |
303 | ||
304 | %files -n sip-PyQt5 | |
305 | %defattr(644,root,root,755) | |
306 | %{py3_sitedir}/PyQt5/bindings | |
2d273691 | 307 | %{py3_sitedir}/PyQt5/sip.pyi |
c9876ce7 JR |
308 | |
309 | %files -n Qt5Designer-plugin-pyqt5 | |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_libdir}/qt5/plugins/designer/libpyqt5.so |