3 %bcond_without python2 # CPython 2.x modules
4 %bcond_without python3 # CPython 3.x modules
6 Summary: Python bindings generator for C++ class libraries
7 Summary(pl.UTF-8): Generator powiązań Pythona z bibliotekami klas C++
12 License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
13 Group: Development/Languages/Python
14 Source0: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: c06bfa2206ddebbff983c272b40a84b9
16 URL: http://www.riverbankcomputing.com/software/sip/
17 BuildRequires: libstdc++-devel
18 BuildRequires: python-devel >= 1:2.3
19 BuildRequires: python3-devel >= 1:3.2
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.167
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _sipfilesdir %{_datadir}/sip
27 SIP generates Python bindings for C++ class libraries from a set of
28 class specification files. It supports Python v2 and v3.
30 %description -l pl.UTF-8
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.
34 %package -n python-sip
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
37 Group: Libraries/Python
40 %description -n python-sip
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.
45 %description -n python-sip -l pl.UTF-8
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ń.
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
57 %description -n python-sip-devel
58 Python 2 development files needed to build bindings for C++ classes
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.
65 %package -n python-PyQt5-sip
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
68 Group: Libraries/Python
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
74 library needed by all generated bindings for PyQt5.
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
79 potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
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
84 Group: Development/Libraries
85 Requires: python-PyQt5-sip = %{epoch}:%{version}-%{release}
86 Requires: python-sip-devel = %{epoch}:%{version}-%{release}
88 %description -n python-PyQt5-sip-devel
89 Python 2 development files needed to build bindings for C++ classes
92 %description -n python-PyQt5-sip-devel -l pl.UTF-8
93 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
94 C++ dla PyQt5 przy użyciu SIP-a.
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
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.
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ń.
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
120 %description -n python3-sip-devel
121 Python 3 development files needed to build bindings for C++ classes
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.
128 %package -n python3-PyQt5-sip
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
131 Group: Libraries/Python
132 Requires: python3-libs
134 %description -n python3-PyQt5-sip
135 SIP generates Python bindings for C++ class libraries from a set of
136 class specification files. This package includes Python 2 runtime
137 library needed by all generated bindings for PyQt5.
139 %description -n python3-PyQt5-sip -l pl.UTF-8
140 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
141 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
142 potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
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
147 Group: Development/Libraries
148 Requires: python3-PyQt5-sip = %{epoch}:%{version}-%{release}
149 Requires: python3-sip-devel = %{epoch}:%{version}-%{release}
151 %description -n python3-PyQt5-sip-devel
152 Python 3 development files needed to build bindings for C++ classes
155 %description -n python3-PyQt5-sip-devel -l pl.UTF-8
156 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
157 C++ dla PyQt5 przy użyciu SIP-a.
163 # configure.py notes:
164 # - macros overrides must be last
165 # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
170 %{__python} ../configure.py \
177 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
178 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
180 LINK_SHLIB="%{__cxx}"
185 install -d build-py2-PyQt5
187 %{__python} ../configure.py \
188 --sip-module=PyQt5.sip \
195 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
196 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
198 LINK_SHLIB="%{__cxx}"
207 %{__python3} ../configure.py \
214 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
215 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
217 LINK_SHLIB="%{__cxx}"
222 install -d build-py3-PyQt5
224 %{__python3} ../configure.py \
225 --sip-module=PyQt5.sip \
232 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
233 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
235 LINK_SHLIB="%{__cxx}"
242 rm -rf $RPM_BUILD_ROOT
243 install -d $RPM_BUILD_ROOT%{_sipfilesdir}
246 %{__make} -C build-py2 install \
247 DESTDIR=$RPM_BUILD_ROOT
249 %{__make} -C build-py2-PyQt5 install \
250 DESTDIR=$RPM_BUILD_ROOT
252 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
253 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
254 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/{sip,PyQt5_sip}-%{version}.dist-info
258 %{__make} -C build-py3 install \
259 DESTDIR=$RPM_BUILD_ROOT
261 %{__make} -C build-py3-PyQt5 install \
262 DESTDIR=$RPM_BUILD_ROOT
264 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
265 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
266 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/{sip,PyQt5_sip}-%{version}.dist-info
270 rm -rf $RPM_BUILD_ROOT
273 %defattr(644,root,root,755)
274 %doc LICENSE NEWS README doc/html
275 %attr(755,root,root) %{_bindir}/sip
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{py_sitedir}/sip.so
283 %files -n python-sip-devel
284 %defattr(644,root,root,755)
285 %{py_sitedir}/sipconfig.py
286 %{py_sitedir}/sipconfig.py[co]
287 %{py_sitedir}/sipdistutils.py
288 %{py_sitedir}/sipdistutils.py[co]
289 %{py_sitedir}/sip.pyi
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
297 %files -n python-PyQt5-sip-devel
298 %defattr(644,root,root,755)
299 %{py_sitedir}/PyQt5/sip.pyi
303 %files -n python3-sip
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{py3_sitedir}/sip.so
307 %files -n python3-sip-devel
308 %defattr(644,root,root,755)
309 %{py3_sitedir}/sipconfig.py
310 %{py3_sitedir}/sipdistutils.py
311 %{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
312 %{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
313 %{py3_sitedir}/sip.pyi
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
321 %files -n python3-PyQt5-sip-devel
322 %defattr(644,root,root,755)
323 %{py3_sitedir}/PyQt5/sip.pyi