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