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