]>
Commit | Line | Data |
---|---|---|
b7bd06fb JP |
1 | # Conditional build: |
2 | %bcond_without python2 # CPython 2.x modules | |
3 | %bcond_without python3 # CPython 3.x modules | |
4 | ||
5 | %define module PyQtWebEngine | |
6 | # minimal required sip version | |
7 | %define sip_ver 2:4.19.14-1 | |
8 | # last qt version covered by these bindings (minimal required is currently 5.0.0) | |
9 | # %define qt_ver %{version} | |
10 | %define qt_ver 5.12.0 | |
11 | ||
12 | Summary: Python 2 bindings for the Qt5WebEngine module | |
13 | Summary(pl.UTF-8): Wiązania Pythona 2 do modułu Qt5WebEngine | |
14 | Name: python-%{module} | |
6265108a | 15 | Version: 5.15.0 |
13ddec04 | 16 | Release: 1 |
b7bd06fb JP |
17 | License: GPL v3 |
18 | Group: Libraries/Python | |
b84fdeac | 19 | Source0: https://pypi.python.org/packages/source/P/PyQtWebEngine/PyQtWebEngine-%{version}.tar.gz |
6265108a | 20 | # Source0-md5: 043f5b0130163ddf04faa3b0472bb0de |
b7bd06fb JP |
21 | Patch0: install.patch |
22 | URL: http://www.riverbankcomputing.com/software/pyqtwebengine/ | |
9b68eaa4 | 23 | BuildRequires: Qt5WebEngine-devel >= %{qt_ver} |
b7bd06fb | 24 | BuildRequires: pkgconfig |
6b7a241c | 25 | %if %{with python2} |
636b818b | 26 | BuildRequires: python-PyQt5 |
b7bd06fb JP |
27 | BuildRequires: python-PyQt5-sip >= %{sip_ver} |
28 | BuildRequires: python-sip-devel >= %{sip_ver} | |
6b7a241c JP |
29 | %endif |
30 | %if %{with python3} | |
636b818b | 31 | BuildRequires: python3-PyQt5 |
b7bd06fb JP |
32 | BuildRequires: python3-PyQt5-sip >= %{sip_ver} |
33 | BuildRequires: python3-sip-devel >= %{sip_ver} | |
6b7a241c | 34 | %endif |
b7bd06fb JP |
35 | BuildRequires: qt5-build >= %{qt_ver} |
36 | BuildRequires: qt5-qmake >= %{qt_ver} | |
37 | BuildRequires: rpm-pythonprov | |
38 | BuildRequires: rpmbuild(macros) >= 1.219 | |
39 | BuildRequires: sip-PyQt5 >= 5.12 | |
40 | Requires: python-libs | |
41 | Requires: python-PyQt5-sip >= %{sip_ver} | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %define _sipfilesdir %{_datadir}/sip | |
45 | ||
46 | %description | |
47 | Python 2 bindings for the Qt5WebEngine module. | |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | Wiązania Pythona 2 do modułu Qt5WebEngine. | |
51 | ||
52 | %package -n python3-PyQtWebEngine | |
53 | Summary: Python 3 bindings for the Qt5WebEngine module | |
54 | Summary(pl.UTF-8): Wiązania Pythona 2 do modułu Qt5WebEngine | |
55 | Group: Libraries/Python | |
56 | Requires: python3-libs | |
57 | Requires: python3-PyQt5-sip >= %{sip_ver} | |
58 | ||
59 | %description -n python3-PyQtWebEngine | |
60 | Python 3 bindings for the Qt5WebEngine module. | |
61 | ||
62 | %description -n python3-PyQtWebEngine -l pl.UTF-8 | |
63 | Wiązania Pythona 2 do modułu Qt5WebEngine. | |
64 | ||
65 | %package -n sip-PyQtWebEngine | |
66 | Summary: SIP files needed to build bindings for Qt5WebEngine | |
67 | Summary(pl.UTF-8): Pliki SIP potrzebne do budowania wiązań do Qt5WebEngine | |
68 | Group: Development/Languages/Python | |
69 | Requires: sip >= %{sip_ver} | |
70 | ||
71 | %description -n sip-PyQtWebEngine | |
72 | SIP files needed to build bindings for Qt5WebEngine. | |
73 | ||
74 | %description -n sip-PyQtWebEngine -l pl.UTF-8 | |
75 | Pliki SIP potrzebne do budowania wiązań do Qt5WebEngine. | |
76 | ||
77 | %package -n qscintilla2-%{module}-api | |
78 | Summary: PyQtWebEngine API file for QScintilla | |
79 | Summary(pl.UTF-8): Plik API PyQtWebEngine dla QScintilli | |
80 | Group: Libraries/Python | |
81 | Requires: qscintilla2-qt5 >= 2.2-2 | |
82 | ||
83 | %description -n qscintilla2-%{module}-api | |
84 | PyQtWebEngine API file can be used by the QScintilla editor component | |
85 | to enable the use of auto-completion and call tips when editing | |
86 | PyQtWebEngine code. | |
87 | ||
88 | %description -n qscintilla2-%{module}-api -l pl.UTF-8 | |
89 | Plik API PyQtWebEngine może być używany przez komponent edytora | |
90 | QScintilla aby umożliwić automatyczne dopełnianie i podpowiedzi przy | |
91 | modyfikowaniu kodu wykorzystującego PyQtWebEngine. | |
92 | ||
93 | %prep | |
13ddec04 | 94 | %setup -q -n PyQtWebEngine-%{version} |
b7bd06fb JP |
95 | %patch0 -p1 |
96 | ||
97 | %build | |
98 | %if %{with python2} | |
99 | install -d build-py2 | |
100 | cd build-py2 | |
101 | %{__python} ../configure.py \ | |
102 | --no-dist-info \ | |
103 | --verbose \ | |
104 | -c -j 3 \ | |
105 | -q "%{_bindir}/qmake-qt5" | |
106 | ||
107 | %{__make} | |
108 | cd .. | |
109 | %endif | |
110 | ||
111 | %if %{with python3} | |
112 | install -d build-py3 | |
113 | cd build-py3 | |
114 | %{__python3} ../configure.py \ | |
115 | --no-dist-info \ | |
116 | --verbose \ | |
117 | -c -j 3 \ | |
118 | -q "%{_bindir}/qmake-qt5" | |
119 | ||
120 | %{__make} | |
121 | cd .. | |
122 | %endif | |
123 | ||
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %if %{with python3} | |
128 | %{__make} -C build-py3 install \ | |
129 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
130 | ||
131 | %endif | |
132 | ||
133 | %if %{with python2} | |
134 | %{__make} -C build-py2 install \ | |
135 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
136 | ||
137 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
138 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
139 | %endif | |
140 | ||
141 | %clean | |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
144 | %if %{with python2} | |
145 | %files | |
146 | %defattr(644,root,root,755) | |
147 | %attr(755,root,root) %{py_sitedir}/PyQt5/QtWebEngine.so | |
148 | %attr(755,root,root) %{py_sitedir}/PyQt5/QtWebEngineCore.so | |
149 | %attr(755,root,root) %{py_sitedir}/PyQt5/QtWebEngineWidgets.so | |
fd884756 JP |
150 | %{py_sitedir}/PyQt5/QtWebEngine.pyi |
151 | %{py_sitedir}/PyQt5/QtWebEngineCore.pyi | |
152 | %{py_sitedir}/PyQt5/QtWebEngineWidgets.pyi | |
b7bd06fb JP |
153 | %endif |
154 | ||
155 | %if %{with python3} | |
156 | %files -n python3-PyQtWebEngine | |
157 | %defattr(644,root,root,755) | |
158 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebEngine.so | |
159 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebEngineCore.so | |
160 | %attr(755,root,root) %{py3_sitedir}/PyQt5/QtWebEngineWidgets.so | |
fd884756 JP |
161 | %{py3_sitedir}/PyQt5/QtWebEngine.pyi |
162 | %{py3_sitedir}/PyQt5/QtWebEngineCore.pyi | |
163 | %{py3_sitedir}/PyQt5/QtWebEngineWidgets.pyi | |
b7bd06fb JP |
164 | %endif |
165 | ||
166 | %files -n sip-PyQtWebEngine | |
167 | %defattr(644,root,root,755) | |
168 | %{_sipfilesdir}/PyQt5/QtWebEngine | |
169 | %{_sipfilesdir}/PyQt5/QtWebEngineCore | |
170 | %{_sipfilesdir}/PyQt5/QtWebEngineWidgets | |
171 | ||
172 | %files -n qscintilla2-%{module}-api | |
173 | %defattr(644,root,root,755) | |
174 | %{_datadir}/qt5/qsci/api/python/PyQtWebEngine.api |