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: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz
15 # Source0-md5: e28b0790dfe4962ce6bbd7c4772f40c9
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-PyQt5-sip
51 Summary: Python 2 module needed by SIP generated bindings
52 Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
53 Group: Libraries/Python
56 %description -n python-PyQt5-sip
57 SIP generates Python bindings for C++ class libraries from a set of
58 class specification files. This package includes Python 2 runtime
59 library needed by all generated bindings.
63 %description -n python-PyQt5-sip -l pl.UTF-8
64 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
65 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
66 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
70 %package -n python-sip-devel
71 Summary: Python 2 development files needed to build bindings using SIP
72 Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
73 Group: Development/Libraries
74 Requires: %{name} = %{epoch}:%{version}-%{release}
75 Requires: python-sip = %{epoch}:%{version}-%{release}
76 Requires: python-PyQt5-sip = %{epoch}:%{version}-%{release}
77 Requires: python-devel >= 1:2.3
79 %description -n python-sip-devel
80 Python 2 development files needed to build bindings for C++ classes
83 %description -n python-sip-devel -l pl.UTF-8
84 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
85 C++ przy użyciu SIP-a.
87 %package -n python3-sip
88 Summary: Python 3 module needed by SIP generated bindings
89 Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
90 Group: Libraries/Python
91 Requires: python3-libs
93 %description -n python3-sip
94 SIP generates Python bindings for C++ class libraries from a set of
95 class specification files. This package includes Python 3 runtime
96 library needed by all generated bindings.
98 %description -n python3-sip -l pl.UTF-8
99 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
100 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
101 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
103 %package -n python3-PyQt5-sip
104 Summary: Python 3 module needed by SIP generated bindings
105 Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
106 Group: Libraries/Python
107 Requires: python3-libs
109 %description -n python3-PyQt5-sip
110 SIP generates Python bindings for C++ class libraries from a set of
111 class specification files. This package includes Python 3 runtime
112 library needed by all generated bindings.
116 %description -n python3-PyQt5-sip -l pl.UTF-8
117 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
118 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
119 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
121 Prywatna kopia PyQt5.
123 %package -n python3-sip-devel
124 Summary: Python 3 development files needed to build bindings using SIP
125 Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
126 Group: Development/Libraries
127 Requires: %{name} = %{epoch}:%{version}-%{release}
128 Requires: python3-sip = %{epoch}:%{version}-%{release}
129 Requires: python3-PyQt5-sip = %{epoch}:%{version}-%{release}
130 Requires: python3-devel >= 1:3.2
132 %description -n python3-sip-devel
133 Python 3 development files needed to build bindings for C++ classes
136 %description -n python3-sip-devel -l pl.UTF-8
137 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
138 C++ przy użyciu SIP-a.
144 # configure.py notes:
145 # - macros overrides must be last
146 # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
151 %{__python} ../configure.py \
158 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
159 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
161 LINK_SHLIB="%{__cxx}"
166 install -d build-py2-PyQt5
168 %{__python} ../configure.py \
169 --sip-module=PyQt5.sip \
176 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
177 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
179 LINK_SHLIB="%{__cxx}"
188 %{__python3} ../configure.py \
195 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
196 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
198 LINK_SHLIB="%{__cxx}"
203 install -d build-py3-PyQt5
205 %{__python3} ../configure.py \
206 --sip-module=PyQt5.sip \
213 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
214 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
216 LINK_SHLIB="%{__cxx}"
223 rm -rf $RPM_BUILD_ROOT
224 install -d $RPM_BUILD_ROOT%{_sipfilesdir}
227 %{__make} -C build-py2 install \
228 DESTDIR=$RPM_BUILD_ROOT
230 %{__make} -C build-py2-PyQt5 install \
231 DESTDIR=$RPM_BUILD_ROOT
233 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
234 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
238 %{__make} -C build-py3 install \
239 DESTDIR=$RPM_BUILD_ROOT
241 %{__make} -C build-py3-PyQt5 install \
242 DESTDIR=$RPM_BUILD_ROOT
244 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
245 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
249 rm -rf $RPM_BUILD_ROOT
252 %defattr(644,root,root,755)
253 %doc LICENSE NEWS README doc/html
254 %attr(755,root,root) %{_bindir}/sip
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{py_sitedir}/sip.so
262 %files -n python-PyQt5-sip
263 %defattr(644,root,root,755)
264 %dir %{py_sitedir}/PyQt5
265 %attr(755,root,root) %{py_sitedir}/PyQt5/sip.so
267 %files -n python-sip-devel
268 %defattr(644,root,root,755)
269 %{py_sitedir}/sipconfig.py
270 %{py_sitedir}/sipconfig.py[co]
271 %{py_sitedir}/sipdistutils.py
272 %{py_sitedir}/sipdistutils.py[co]
273 %{py_sitedir}/sip.pyi
274 %{py_sitedir}/PyQt5/sip.pyi
279 %files -n python3-sip
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{py3_sitedir}/sip.so
283 %files -n python3-PyQt5-sip
284 %defattr(644,root,root,755)
285 %dir %{py3_sitedir}/PyQt5
286 %attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so
288 %files -n python3-sip-devel
289 %defattr(644,root,root,755)
290 %{py3_sitedir}/sipconfig.py
291 %{py3_sitedir}/sipdistutils.py
292 %{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
293 %{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
294 %{py3_sitedir}/sip.pyi
295 %{py3_sitedir}/PyQt5/sip.pyi