]>
Commit | Line | Data |
---|---|---|
4c693150 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x modules | |
4 | %bcond_without python3 # CPython 3.x modules | |
5 | ||
4d6e5f32 | 6 | Summary: Python bindings generator for C++ class libraries |
8bf916ba | 7 | Summary(pl.UTF-8): Generator powiązań Pythona z bibliotekami klas C++ |
183bd075 | 8 | Name: sip |
393015f7 | 9 | Version: 4.19.21 |
dfab31ce | 10 | Release: 1 |
39232d42 | 11 | Epoch: 2 |
1c28206b | 12 | License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3 |
183bd075 | 13 | Group: Development/Languages/Python |
7ce55b35 | 14 | Source0: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/%{name}-%{version}.tar.gz |
393015f7 | 15 | # Source0-md5: dad2afc3d8dfc0d681f3cb87eb2e55aa |
b4641a2f | 16 | URL: http://www.riverbankcomputing.com/software/sip/ |
ba9c55ee | 17 | BuildRequires: libstdc++-devel |
a0ffe2f5 JB |
18 | BuildRequires: python-devel >= 1:2.3 |
19 | BuildRequires: python3-devel >= 1:3.2 | |
bfdf8b01 | 20 | BuildRequires: rpm-pythonprov |
ba9c55ee | 21 | BuildRequires: rpmbuild(macros) >= 1.167 |
ac08bdef | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
183bd075 | 23 | |
7f2259e9 JB |
24 | %define _sipfilesdir %{_datadir}/sip |
25 | ||
183bd075 | 26 | %description |
4c693150 JB |
27 | SIP generates Python bindings for C++ class libraries from a set of |
28 | class specification files. It supports Python v2 and v3. | |
183bd075 | 29 | |
dd6dda9e | 30 | %description -l pl.UTF-8 |
4c693150 JB |
31 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru |
32 | plików ze specyfikacjami klas. Obsługiwany jest Python 2 i 3. | |
7143dd0b | 33 | |
7143dd0b | 34 | %package -n python-sip |
4c693150 JB |
35 | Summary: Python 2 module needed by SIP generated bindings |
36 | Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP | |
7143dd0b | 37 | Group: Libraries/Python |
4c693150 | 38 | Requires: python-libs |
7143dd0b KK |
39 | |
40 | %description -n python-sip | |
4c693150 JB |
41 | SIP generates Python bindings for C++ class libraries from a set of |
42 | class specification files. This package includes Python 2 runtime | |
43 | library needed by all generated bindings. | |
7143dd0b | 44 | |
dd6dda9e | 45 | %description -n python-sip -l pl.UTF-8 |
4c693150 JB |
46 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru |
47 | plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2 | |
48 | potrzebną do uruchomienia wszystkich wygenerowanych powiązań. | |
183bd075 | 49 | |
6e8f53ed JB |
50 | %package -n python-sip-devel |
51 | Summary: Python 2 development files needed to build bindings using SIP | |
52 | Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
55 | Requires: python-devel >= 1:2.3 | |
56 | ||
57 | %description -n python-sip-devel | |
58 | Python 2 development files needed to build bindings for C++ classes | |
59 | using SIP. | |
60 | ||
61 | %description -n python-sip-devel -l pl.UTF-8 | |
62 | Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas | |
63 | C++ przy użyciu SIP-a. | |
64 | ||
89f5b166 | 65 | %package -n python-PyQt5-sip |
6e8f53ed JB |
66 | Summary: Python 2 module needed by SIP generated bindings for PyQt5 |
67 | Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP dla PyQt5 | |
89f5b166 JR |
68 | Group: Libraries/Python |
69 | Requires: python-libs | |
70 | ||
71 | %description -n python-PyQt5-sip | |
72 | SIP generates Python bindings for C++ class libraries from a set of | |
73 | class specification files. This package includes Python 2 runtime | |
6e8f53ed | 74 | library needed by all generated bindings for PyQt5. |
89f5b166 JR |
75 | |
76 | %description -n python-PyQt5-sip -l pl.UTF-8 | |
77 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru | |
78 | plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2 | |
6e8f53ed | 79 | potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5. |
89f5b166 | 80 | |
6e8f53ed JB |
81 | %package -n python-PyQt5-sip-devel |
82 | Summary: Python 2 development files needed to build bindings for PyQt5 using SIP | |
83 | Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a | |
9e00b3d2 | 84 | Group: Development/Libraries |
57fb065a | 85 | Requires: python-PyQt5-sip = %{epoch}:%{version}-%{release} |
6e8f53ed | 86 | Requires: python-sip-devel = %{epoch}:%{version}-%{release} |
9e00b3d2 | 87 | |
6e8f53ed | 88 | %description -n python-PyQt5-sip-devel |
4c693150 | 89 | Python 2 development files needed to build bindings for C++ classes |
6e8f53ed | 90 | for PyQt5 using SIP. |
9e00b3d2 | 91 | |
6e8f53ed | 92 | %description -n python-PyQt5-sip-devel -l pl.UTF-8 |
4c693150 | 93 | Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas |
6e8f53ed | 94 | C++ dla PyQt5 przy użyciu SIP-a. |
4c693150 JB |
95 | |
96 | %package -n python3-sip | |
97 | Summary: Python 3 module needed by SIP generated bindings | |
98 | Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP | |
99 | Group: Libraries/Python | |
100 | Requires: python3-libs | |
101 | ||
102 | %description -n python3-sip | |
103 | SIP generates Python bindings for C++ class libraries from a set of | |
104 | class specification files. This package includes Python 3 runtime | |
105 | library needed by all generated bindings. | |
106 | ||
107 | %description -n python3-sip -l pl.UTF-8 | |
108 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru | |
109 | plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3 | |
110 | potrzebną do uruchomienia wszystkich wygenerowanych powiązań. | |
111 | ||
6e8f53ed JB |
112 | %package -n python3-sip-devel |
113 | Summary: Python 3 development files needed to build bindings using SIP | |
114 | Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a | |
115 | Group: Development/Libraries | |
116 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
117 | Requires: python3-sip = %{epoch}:%{version}-%{release} | |
118 | Requires: python3-devel >= 1:3.2 | |
119 | ||
120 | %description -n python3-sip-devel | |
121 | Python 3 development files needed to build bindings for C++ classes | |
122 | using SIP. | |
123 | ||
124 | %description -n python3-sip-devel -l pl.UTF-8 | |
125 | Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas | |
126 | C++ przy użyciu SIP-a. | |
127 | ||
89f5b166 | 128 | %package -n python3-PyQt5-sip |
6e8f53ed JB |
129 | Summary: Python 3 module needed by SIP generated bindings for PyQt5 |
130 | Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP dla PyQt5 | |
89f5b166 JR |
131 | Group: Libraries/Python |
132 | Requires: python3-libs | |
133 | ||
134 | %description -n python3-PyQt5-sip | |
135 | SIP generates Python bindings for C++ class libraries from a set of | |
6e8f53ed JB |
136 | class specification files. This package includes Python 2 runtime |
137 | library needed by all generated bindings for PyQt5. | |
89f5b166 JR |
138 | |
139 | %description -n python3-PyQt5-sip -l pl.UTF-8 | |
140 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru | |
6e8f53ed JB |
141 | plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2 |
142 | potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5. | |
89f5b166 | 143 | |
6e8f53ed JB |
144 | %package -n python3-PyQt5-sip-devel |
145 | Summary: Python 3 development files needed to build bindings for PyQt5 using SIP | |
146 | Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a | |
4c693150 | 147 | Group: Development/Libraries |
57fb065a | 148 | Requires: python3-PyQt5-sip = %{epoch}:%{version}-%{release} |
6e8f53ed | 149 | Requires: python3-sip-devel = %{epoch}:%{version}-%{release} |
4c693150 | 150 | |
6e8f53ed | 151 | %description -n python3-PyQt5-sip-devel |
4c693150 | 152 | Python 3 development files needed to build bindings for C++ classes |
6e8f53ed | 153 | for PyQt5 using SIP. |
4c693150 | 154 | |
6e8f53ed | 155 | %description -n python3-PyQt5-sip-devel -l pl.UTF-8 |
4c693150 | 156 | Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas |
6e8f53ed | 157 | C++ dla PyQt5 przy użyciu SIP-a. |
9e00b3d2 | 158 | |
183bd075 | 159 | %prep |
16564698 | 160 | %setup -q |
183bd075 | 161 | |
162 | %build | |
f7707c80 JB |
163 | # configure.py notes: |
164 | # - macros overrides must be last | |
165 | # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags | |
4c693150 JB |
166 | |
167 | %if %{with python2} | |
168 | install -d build-py2 | |
169 | cd build-py2 | |
89f5b166 JR |
170 | %{__python} ../configure.py \ |
171 | -b %{_bindir} \ | |
172 | -e %{py_incdir} \ | |
173 | -v %{_sipfilesdir} \ | |
174 | -d %{py_sitedir} \ | |
175 | CC="%{__cc}" \ | |
176 | CXX="%{__cxx}" \ | |
177 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
178 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
179 | LINK="%{__cxx}" \ | |
180 | LINK_SHLIB="%{__cxx}" | |
181 | ||
182 | %{__make} | |
183 | cd .. | |
184 | ||
185 | install -d build-py2-PyQt5 | |
186 | cd build-py2-PyQt5 | |
4c693150 | 187 | %{__python} ../configure.py \ |
c0d3d5be | 188 | --sip-module=PyQt5.sip \ |
f7707c80 | 189 | -b %{_bindir} \ |
21ced613 | 190 | -e %{py_incdir} \ |
8df445fb | 191 | -v %{_sipfilesdir} \ |
db24e112 | 192 | -d %{py_sitedir} \ |
dd4053c2 | 193 | CC="%{__cc}" \ |
f7707c80 | 194 | CXX="%{__cxx}" \ |
751a9b24 AM |
195 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
196 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
8df445fb KK |
197 | LINK="%{__cxx}" \ |
198 | LINK_SHLIB="%{__cxx}" | |
199 | ||
200 | %{__make} | |
4c693150 JB |
201 | cd .. |
202 | %endif | |
203 | ||
204 | %if %{with python3} | |
205 | install -d build-py3 | |
206 | cd build-py3 | |
89f5b166 JR |
207 | %{__python3} ../configure.py \ |
208 | -b %{_bindir} \ | |
209 | -e %{py3_incdir} \ | |
210 | -v %{_sipfilesdir} \ | |
211 | -d %{py3_sitedir} \ | |
212 | CC="%{__cc}" \ | |
213 | CXX="%{__cxx}" \ | |
214 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
215 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
216 | LINK="%{__cxx}" \ | |
217 | LINK_SHLIB="%{__cxx}" | |
218 | ||
219 | %{__make} | |
220 | cd .. | |
221 | ||
222 | install -d build-py3-PyQt5 | |
223 | cd build-py3-PyQt5 | |
4c693150 | 224 | %{__python3} ../configure.py \ |
c0d3d5be | 225 | --sip-module=PyQt5.sip \ |
4c693150 JB |
226 | -b %{_bindir} \ |
227 | -e %{py3_incdir} \ | |
228 | -v %{_sipfilesdir} \ | |
229 | -d %{py3_sitedir} \ | |
230 | CC="%{__cc}" \ | |
231 | CXX="%{__cxx}" \ | |
232 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
233 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
234 | LINK="%{__cxx}" \ | |
235 | LINK_SHLIB="%{__cxx}" | |
236 | ||
237 | %{__make} | |
238 | cd .. | |
239 | %endif | |
183bd075 | 240 | |
241 | %install | |
21ced613 | 242 | rm -rf $RPM_BUILD_ROOT |
21ced613 | 243 | install -d $RPM_BUILD_ROOT%{_sipfilesdir} |
183bd075 | 244 | |
4c693150 | 245 | %if %{with python2} |
d25da5ca | 246 | %{__make} -C build-py2 install \ |
15e0c203 JB |
247 | DESTDIR=$RPM_BUILD_ROOT |
248 | ||
d25da5ca | 249 | %{__make} -C build-py2-PyQt5 install \ |
89f5b166 JR |
250 | DESTDIR=$RPM_BUILD_ROOT |
251 | ||
f2b32c00 JB |
252 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
253 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
6e8f53ed | 254 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/{sip,PyQt5_sip}-%{version}.dist-info |
4c693150 JB |
255 | %endif |
256 | ||
257 | %if %{with python3} | |
d25da5ca | 258 | %{__make} -C build-py3 install \ |
4c693150 | 259 | DESTDIR=$RPM_BUILD_ROOT |
15201a5b | 260 | |
d25da5ca | 261 | %{__make} -C build-py3-PyQt5 install \ |
89f5b166 JR |
262 | DESTDIR=$RPM_BUILD_ROOT |
263 | ||
15201a5b JB |
264 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} |
265 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
6e8f53ed | 266 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/{sip,PyQt5_sip}-%{version}.dist-info |
4c693150 | 267 | %endif |
7048cca3 | 268 | |
183bd075 | 269 | %clean |
270 | rm -rf $RPM_BUILD_ROOT | |
271 | ||
272 | %files | |
273 | %defattr(644,root,root,755) | |
7048cca3 JB |
274 | %doc LICENSE NEWS README doc/html |
275 | %attr(755,root,root) %{_bindir}/sip | |
4c693150 | 276 | %dir %{_sipfilesdir} |
7143dd0b | 277 | |
4c693150 | 278 | %if %{with python2} |
9e00b3d2 KK |
279 | %files -n python-sip |
280 | %defattr(644,root,root,755) | |
89f5b166 JR |
281 | %attr(755,root,root) %{py_sitedir}/sip.so |
282 | ||
9e00b3d2 | 283 | %files -n python-sip-devel |
7143dd0b | 284 | %defattr(644,root,root,755) |
f2b32c00 JB |
285 | %{py_sitedir}/sipconfig.py |
286 | %{py_sitedir}/sipconfig.py[co] | |
287 | %{py_sitedir}/sipdistutils.py | |
288 | %{py_sitedir}/sipdistutils.py[co] | |
57fb065a | 289 | %{py_sitedir}/sip.pyi |
7048cca3 | 290 | %{py_incdir}/sip.h |
6e8f53ed JB |
291 | |
292 | %files -n python-PyQt5-sip | |
293 | %defattr(644,root,root,755) | |
294 | %dir %{py_sitedir}/PyQt5 | |
295 | %attr(755,root,root) %{py_sitedir}/PyQt5/sip.so | |
296 | ||
297 | %files -n python-PyQt5-sip-devel | |
298 | %defattr(644,root,root,755) | |
299 | %{py_sitedir}/PyQt5/sip.pyi | |
4c693150 JB |
300 | %endif |
301 | ||
302 | %if %{with python3} | |
303 | %files -n python3-sip | |
304 | %defattr(644,root,root,755) | |
89f5b166 JR |
305 | %attr(755,root,root) %{py3_sitedir}/sip.so |
306 | ||
4c693150 JB |
307 | %files -n python3-sip-devel |
308 | %defattr(644,root,root,755) | |
309 | %{py3_sitedir}/sipconfig.py | |
310 | %{py3_sitedir}/sipdistutils.py | |
15201a5b JB |
311 | %{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co] |
312 | %{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co] | |
57fb065a | 313 | %{py3_sitedir}/sip.pyi |
4c693150 | 314 | %{py3_incdir}/sip.h |
6e8f53ed JB |
315 | |
316 | %files -n python3-PyQt5-sip | |
317 | %defattr(644,root,root,755) | |
318 | %dir %{py3_sitedir}/PyQt5 | |
319 | %attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so | |
320 | ||
321 | %files -n python3-PyQt5-sip-devel | |
322 | %defattr(644,root,root,755) | |
323 | %{py3_sitedir}/PyQt5/sip.pyi | |
4c693150 | 324 | %endif |