]> git.pld-linux.org Git - packages/sip.git/blame - sip.spec
rebuild with python 3.10
[packages/sip.git] / sip.spec
CommitLineData
4c693150
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x modules
4%bcond_without python3 # CPython 3.x modules
54dbd1b2
JB
5%bcond_without pyqt4 # PyQt4.sip module
6%bcond_without pyqt5 # PyQt5.sip module
4c693150 7
4d6e5f32 8Summary: Python bindings generator for C++ class libraries
8bf916ba 9Summary(pl.UTF-8): Generator powiązań Pythona z bibliotekami klas C++
183bd075 10Name: sip
9e4fe28b 11Version: 4.19.25
a2c8e4c4 12Release: 3
39232d42 13Epoch: 2
1c28206b 14License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
183bd075 15Group: Development/Languages/Python
9e4fe28b 16#Source0Download: https://riverbankcomputing.com/software/sip/download
7ce55b35 17Source0: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/%{name}-%{version}.tar.gz
9e4fe28b
JB
18# Source0-md5: 1891a7b71c72d83951d5851ae10b2f0c
19URL: https://riverbankcomputing.com/software/sip/
ba9c55ee 20BuildRequires: libstdc++-devel
a0ffe2f5
JB
21BuildRequires: python-devel >= 1:2.3
22BuildRequires: python3-devel >= 1:3.2
bfdf8b01 23BuildRequires: rpm-pythonprov
ba9c55ee 24BuildRequires: rpmbuild(macros) >= 1.167
ac08bdef 25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
183bd075 26
7f2259e9
JB
27%define _sipfilesdir %{_datadir}/sip
28
183bd075 29%description
4c693150
JB
30SIP generates Python bindings for C++ class libraries from a set of
31class specification files. It supports Python v2 and v3.
183bd075 32
dd6dda9e 33%description -l pl.UTF-8
4c693150
JB
34SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
35plików ze specyfikacjami klas. Obsługiwany jest Python 2 i 3.
7143dd0b 36
7143dd0b 37%package -n python-sip
4c693150
JB
38Summary: Python 2 module needed by SIP generated bindings
39Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
7143dd0b 40Group: Libraries/Python
4c693150 41Requires: python-libs
7143dd0b
KK
42
43%description -n python-sip
4c693150
JB
44SIP generates Python bindings for C++ class libraries from a set of
45class specification files. This package includes Python 2 runtime
46library needed by all generated bindings.
7143dd0b 47
dd6dda9e 48%description -n python-sip -l pl.UTF-8
4c693150
JB
49SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
50plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
51potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
183bd075 52
6e8f53ed
JB
53%package -n python-sip-devel
54Summary: Python 2 development files needed to build bindings using SIP
55Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
56Group: Development/Libraries
57Requires: %{name} = %{epoch}:%{version}-%{release}
58Requires: python-devel >= 1:2.3
59
60%description -n python-sip-devel
61Python 2 development files needed to build bindings for C++ classes
62using SIP.
63
64%description -n python-sip-devel -l pl.UTF-8
65Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
66C++ przy użyciu SIP-a.
67
54dbd1b2
JB
68%package -n python-PyQt4-sip
69Summary: Python 2 module needed by SIP generated bindings for PyQt4
70Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP dla PyQt4
71Group: Libraries/Python
72Requires: python-libs
73
74%description -n python-PyQt4-sip
75SIP generates Python bindings for C++ class libraries from a set of
76class specification files. This package includes Python 2 runtime
77library needed by all generated bindings for PyQt4.
78
79%description -n python-PyQt4-sip -l pl.UTF-8
80SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
81plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
82potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt4.
83
84%package -n python-PyQt4-sip-devel
85Summary: Python 2 development files needed to build bindings for PyQt4 using SIP
86Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla PyQt4 przy użyciu SIP-a
87Group: Development/Libraries
88Requires: python-PyQt4-sip = %{epoch}:%{version}-%{release}
89Requires: python-sip-devel = %{epoch}:%{version}-%{release}
90
91%description -n python-PyQt4-sip-devel
92Python 2 development files needed to build bindings for C++ classes
93for PyQt4 using SIP.
94
95%description -n python-PyQt4-sip-devel -l pl.UTF-8
96Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
97C++ dla PyQt4 przy użyciu SIP-a.
98
89f5b166 99%package -n python-PyQt5-sip
6e8f53ed
JB
100Summary: Python 2 module needed by SIP generated bindings for PyQt5
101Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP dla PyQt5
89f5b166
JR
102Group: Libraries/Python
103Requires: python-libs
104
105%description -n python-PyQt5-sip
106SIP generates Python bindings for C++ class libraries from a set of
107class specification files. This package includes Python 2 runtime
6e8f53ed 108library needed by all generated bindings for PyQt5.
89f5b166
JR
109
110%description -n python-PyQt5-sip -l pl.UTF-8
111SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
112plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
6e8f53ed 113potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
89f5b166 114
6e8f53ed
JB
115%package -n python-PyQt5-sip-devel
116Summary: Python 2 development files needed to build bindings for PyQt5 using SIP
117Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a
9e00b3d2 118Group: Development/Libraries
57fb065a 119Requires: python-PyQt5-sip = %{epoch}:%{version}-%{release}
6e8f53ed 120Requires: python-sip-devel = %{epoch}:%{version}-%{release}
9e00b3d2 121
6e8f53ed 122%description -n python-PyQt5-sip-devel
4c693150 123Python 2 development files needed to build bindings for C++ classes
6e8f53ed 124for PyQt5 using SIP.
9e00b3d2 125
6e8f53ed 126%description -n python-PyQt5-sip-devel -l pl.UTF-8
4c693150 127Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
6e8f53ed 128C++ dla PyQt5 przy użyciu SIP-a.
4c693150
JB
129
130%package -n python3-sip
131Summary: Python 3 module needed by SIP generated bindings
132Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
133Group: Libraries/Python
134Requires: python3-libs
135
136%description -n python3-sip
137SIP generates Python bindings for C++ class libraries from a set of
138class specification files. This package includes Python 3 runtime
139library needed by all generated bindings.
140
141%description -n python3-sip -l pl.UTF-8
142SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
143plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
144potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
145
6e8f53ed
JB
146%package -n python3-sip-devel
147Summary: Python 3 development files needed to build bindings using SIP
148Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
149Group: Development/Libraries
150Requires: %{name} = %{epoch}:%{version}-%{release}
151Requires: python3-sip = %{epoch}:%{version}-%{release}
152Requires: python3-devel >= 1:3.2
153
154%description -n python3-sip-devel
155Python 3 development files needed to build bindings for C++ classes
156using SIP.
157
158%description -n python3-sip-devel -l pl.UTF-8
159Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
160C++ przy użyciu SIP-a.
161
54dbd1b2
JB
162%package -n python3-PyQt4-sip
163Summary: Python 3 module needed by SIP generated bindings for PyQt4
164Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP dla PyQt4
165Group: Libraries/Python
166Requires: python3-libs
167
168%description -n python3-PyQt4-sip
169SIP generates Python bindings for C++ class libraries from a set of
170class specification files. This package includes Python 2 runtime
171library needed by all generated bindings for PyQt4.
172
173%description -n python3-PyQt4-sip -l pl.UTF-8
174SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
175plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
176potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt4.
177
178%package -n python3-PyQt4-sip-devel
179Summary: Python 3 development files needed to build bindings for PyQt4 using SIP
180Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla PyQt4 przy użyciu SIP-a
181Group: Development/Libraries
182Requires: python3-PyQt4-sip = %{epoch}:%{version}-%{release}
183Requires: python3-sip-devel = %{epoch}:%{version}-%{release}
184
185%description -n python3-PyQt4-sip-devel
186Python 3 development files needed to build bindings for C++ classes
187for PyQt4 using SIP.
188
189%description -n python3-PyQt4-sip-devel -l pl.UTF-8
190Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
191C++ dla PyQt4 przy użyciu SIP-a.
192
89f5b166 193%package -n python3-PyQt5-sip
6e8f53ed
JB
194Summary: Python 3 module needed by SIP generated bindings for PyQt5
195Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP dla PyQt5
89f5b166
JR
196Group: Libraries/Python
197Requires: python3-libs
198
199%description -n python3-PyQt5-sip
200SIP generates Python bindings for C++ class libraries from a set of
6e8f53ed
JB
201class specification files. This package includes Python 2 runtime
202library needed by all generated bindings for PyQt5.
89f5b166
JR
203
204%description -n python3-PyQt5-sip -l pl.UTF-8
205SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
6e8f53ed
JB
206plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
207potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
89f5b166 208
6e8f53ed
JB
209%package -n python3-PyQt5-sip-devel
210Summary: Python 3 development files needed to build bindings for PyQt5 using SIP
211Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a
4c693150 212Group: Development/Libraries
57fb065a 213Requires: python3-PyQt5-sip = %{epoch}:%{version}-%{release}
6e8f53ed 214Requires: python3-sip-devel = %{epoch}:%{version}-%{release}
4c693150 215
6e8f53ed 216%description -n python3-PyQt5-sip-devel
4c693150 217Python 3 development files needed to build bindings for C++ classes
6e8f53ed 218for PyQt5 using SIP.
4c693150 219
6e8f53ed 220%description -n python3-PyQt5-sip-devel -l pl.UTF-8
4c693150 221Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
6e8f53ed 222C++ dla PyQt5 przy użyciu SIP-a.
9e00b3d2 223
183bd075 224%prep
16564698 225%setup -q
183bd075 226
227%build
f7707c80
JB
228# configure.py notes:
229# - macros overrides must be last
230# - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
4c693150
JB
231
232%if %{with python2}
233install -d build-py2
234cd build-py2
89f5b166
JR
235%{__python} ../configure.py \
236 -b %{_bindir} \
237 -e %{py_incdir} \
238 -v %{_sipfilesdir} \
239 -d %{py_sitedir} \
240 CC="%{__cc}" \
241 CXX="%{__cxx}" \
242 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
243 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
244 LINK="%{__cxx}" \
245 LINK_SHLIB="%{__cxx}"
246
247%{__make}
248cd ..
249
54dbd1b2
JB
250%if %{with pyqt4} || %{with pyqt5}
251for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
252install -d build-py2-${mod}
253cd build-py2-${mod}
4c693150 254%{__python} ../configure.py \
54dbd1b2 255 --sip-module=${mod}.sip \
2dc12057
JB
256 --no-dist-info \
257 --no-tools \
21ced613 258 -e %{py_incdir} \
8df445fb 259 -v %{_sipfilesdir} \
db24e112 260 -d %{py_sitedir} \
dd4053c2 261 CC="%{__cc}" \
f7707c80 262 CXX="%{__cxx}" \
751a9b24
AM
263 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
264 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
8df445fb
KK
265 LINK="%{__cxx}" \
266 LINK_SHLIB="%{__cxx}"
267
268%{__make}
4c693150 269cd ..
54dbd1b2
JB
270done
271%endif
4c693150
JB
272%endif
273
274%if %{with python3}
275install -d build-py3
276cd build-py3
89f5b166
JR
277%{__python3} ../configure.py \
278 -b %{_bindir} \
279 -e %{py3_incdir} \
280 -v %{_sipfilesdir} \
281 -d %{py3_sitedir} \
282 CC="%{__cc}" \
283 CXX="%{__cxx}" \
284 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
285 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
286 LINK="%{__cxx}" \
287 LINK_SHLIB="%{__cxx}"
288
289%{__make}
290cd ..
291
54dbd1b2
JB
292%if %{with pyqt4} || %{with pyqt5}
293for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
294install -d build-py3-${mod}
295cd build-py3-${mod}
4c693150 296%{__python3} ../configure.py \
54dbd1b2 297 --sip-module=${mod}.sip \
2dc12057
JB
298 --no-dist-info \
299 --no-tools \
4c693150
JB
300 -e %{py3_incdir} \
301 -v %{_sipfilesdir} \
302 -d %{py3_sitedir} \
303 CC="%{__cc}" \
304 CXX="%{__cxx}" \
305 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
306 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
307 LINK="%{__cxx}" \
308 LINK_SHLIB="%{__cxx}"
309
310%{__make}
311cd ..
54dbd1b2
JB
312done
313%endif
4c693150 314%endif
183bd075 315
316%install
21ced613 317rm -rf $RPM_BUILD_ROOT
21ced613 318install -d $RPM_BUILD_ROOT%{_sipfilesdir}
183bd075 319
4c693150 320%if %{with python2}
d25da5ca 321%{__make} -C build-py2 install \
15e0c203
JB
322 DESTDIR=$RPM_BUILD_ROOT
323
54dbd1b2
JB
324%if %{with pyqt4} || %{with pyqt5}
325for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
326%{__make} -C build-py2-${mod} install \
89f5b166
JR
327 DESTDIR=$RPM_BUILD_ROOT
328
54dbd1b2
JB
329# ensure content is the same and hardlink
330cmp $RPM_BUILD_ROOT%{py_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py_sitedir}/${mod}/sip.pyi
331ln -f $RPM_BUILD_ROOT%{py_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py_sitedir}/${mod}/sip.pyi
332done
333%endif
334
f2b32c00
JB
335%py_comp $RPM_BUILD_ROOT%{py_sitedir}
336%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
54dbd1b2 337%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/sip-%{version}.dist-info
4c693150
JB
338%endif
339
340%if %{with python3}
d25da5ca 341%{__make} -C build-py3 install \
4c693150 342 DESTDIR=$RPM_BUILD_ROOT
15201a5b 343
54dbd1b2
JB
344%if %{with pyqt4} || %{with pyqt5}
345for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
346%{__make} -C build-py3-${mod} install \
89f5b166
JR
347 DESTDIR=$RPM_BUILD_ROOT
348
54dbd1b2
JB
349# ensure content is the same and hardlink
350cmp $RPM_BUILD_ROOT%{py3_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py3_sitedir}/${mod}/sip.pyi
351ln -f $RPM_BUILD_ROOT%{py3_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py3_sitedir}/${mod}/sip.pyi
352done
353%endif
354
15201a5b
JB
355%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
356%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
54dbd1b2 357%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/sip-%{version}.dist-info
4c693150 358%endif
7048cca3 359
183bd075 360%clean
361rm -rf $RPM_BUILD_ROOT
362
363%files
364%defattr(644,root,root,755)
7048cca3
JB
365%doc LICENSE NEWS README doc/html
366%attr(755,root,root) %{_bindir}/sip
4c693150 367%dir %{_sipfilesdir}
7143dd0b 368
4c693150 369%if %{with python2}
9e00b3d2
KK
370%files -n python-sip
371%defattr(644,root,root,755)
89f5b166
JR
372%attr(755,root,root) %{py_sitedir}/sip.so
373
9e00b3d2 374%files -n python-sip-devel
7143dd0b 375%defattr(644,root,root,755)
f2b32c00
JB
376%{py_sitedir}/sipconfig.py
377%{py_sitedir}/sipconfig.py[co]
378%{py_sitedir}/sipdistutils.py
379%{py_sitedir}/sipdistutils.py[co]
57fb065a 380%{py_sitedir}/sip.pyi
7048cca3 381%{py_incdir}/sip.h
6e8f53ed 382
54dbd1b2
JB
383%if %{with pyqt4}
384%files -n python-PyQt4-sip
385%defattr(644,root,root,755)
386%dir %{py_sitedir}/PyQt4
387%attr(755,root,root) %{py_sitedir}/PyQt4/sip.so
388
389%files -n python-PyQt4-sip-devel
390%defattr(644,root,root,755)
391%{py_sitedir}/PyQt4/sip.pyi
392%endif
393
394%if %{with pyqt5}
6e8f53ed
JB
395%files -n python-PyQt5-sip
396%defattr(644,root,root,755)
397%dir %{py_sitedir}/PyQt5
398%attr(755,root,root) %{py_sitedir}/PyQt5/sip.so
399
400%files -n python-PyQt5-sip-devel
401%defattr(644,root,root,755)
402%{py_sitedir}/PyQt5/sip.pyi
4c693150 403%endif
54dbd1b2 404%endif
4c693150
JB
405
406%if %{with python3}
407%files -n python3-sip
408%defattr(644,root,root,755)
89f5b166
JR
409%attr(755,root,root) %{py3_sitedir}/sip.so
410
4c693150
JB
411%files -n python3-sip-devel
412%defattr(644,root,root,755)
413%{py3_sitedir}/sipconfig.py
414%{py3_sitedir}/sipdistutils.py
15201a5b
JB
415%{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
416%{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
57fb065a 417%{py3_sitedir}/sip.pyi
4c693150 418%{py3_incdir}/sip.h
6e8f53ed 419
54dbd1b2
JB
420%if %{with pyqt4}
421%files -n python3-PyQt4-sip
422%defattr(644,root,root,755)
423%dir %{py3_sitedir}/PyQt4
424%attr(755,root,root) %{py3_sitedir}/PyQt4/sip.so
425
426%files -n python3-PyQt4-sip-devel
427%defattr(644,root,root,755)
428%{py3_sitedir}/PyQt4/sip.pyi
429%endif
430
431%if %{with pyqt5}
6e8f53ed
JB
432%files -n python3-PyQt5-sip
433%defattr(644,root,root,755)
434%dir %{py3_sitedir}/PyQt5
435%attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so
436
437%files -n python3-PyQt5-sip-devel
438%defattr(644,root,root,755)
439%{py3_sitedir}/PyQt5/sip.pyi
4c693150 440%endif
54dbd1b2 441%endif
This page took 1.846896 seconds and 5 git commands to generate.