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-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-sip = %{epoch}:%{version}-%{release}
56 Requires: python-devel >= 1:2.3
58 %description -n python-sip-devel
59 Python 2 development files needed to build bindings for C++ classes
62 %description -n python-sip-devel -l pl.UTF-8
63 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
64 C++ przy użyciu SIP-a.
66 %package -n python3-sip
67 Summary: Python 3 module needed by SIP generated bindings
68 Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
69 Group: Libraries/Python
70 Requires: python3-libs
72 %description -n python3-sip
73 SIP generates Python bindings for C++ class libraries from a set of
74 class specification files. This package includes Python 3 runtime
75 library needed by all generated bindings.
77 %description -n python3-sip -l pl.UTF-8
78 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
79 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
80 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
82 %package -n python3-sip-devel
83 Summary: Python 3 development files needed to build bindings using SIP
84 Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
85 Group: Development/Libraries
86 Requires: %{name} = %{epoch}:%{version}-%{release}
87 Requires: python3-sip = %{epoch}:%{version}-%{release}
88 Requires: python3-devel >= 1:3.2
90 %description -n python3-sip-devel
91 Python 3 development files needed to build bindings for C++ classes
94 %description -n python3-sip-devel -l pl.UTF-8
95 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
96 C++ przy użyciu SIP-a.
102 # configure.py notes:
103 # - macros overrides must be last
104 # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
109 %{__python} ../configure.py \
110 --sip-module=PyQt5.sip \
117 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
118 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
120 LINK_SHLIB="%{__cxx}"
129 %{__python3} ../configure.py \
130 --sip-module=PyQt5.sip \
137 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
138 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
140 LINK_SHLIB="%{__cxx}"
147 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT%{_sipfilesdir}
151 %{__make} -C build-py2 install \
152 DESTDIR=$RPM_BUILD_ROOT
154 echo -n >> $RPM_BUILD_ROOT%{py_sitedir}/PyQt5/__init__.py
156 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
157 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
161 %{__make} -C build-py3 install \
162 DESTDIR=$RPM_BUILD_ROOT
164 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
165 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
169 rm -rf $RPM_BUILD_ROOT
172 %defattr(644,root,root,755)
173 %doc LICENSE NEWS README doc/html
174 %attr(755,root,root) %{_bindir}/sip
179 %defattr(644,root,root,755)
180 %dir %{py_sitedir}/PyQt5
181 %{py_sitedir}/PyQt5/__init__.py
182 %{py_sitedir}/PyQt5/__init__.py[co]
183 %attr(755,root,root) %{py_sitedir}/PyQt5/sip.so
185 %files -n python-sip-devel
186 %defattr(644,root,root,755)
187 %{py_sitedir}/sipconfig.py
188 %{py_sitedir}/sipconfig.py[co]
189 %{py_sitedir}/sipdistutils.py
190 %{py_sitedir}/sipdistutils.py[co]
191 %{py_sitedir}/PyQt5/sip.pyi
196 %files -n python3-sip
197 %defattr(644,root,root,755)
198 %dir %{py3_sitedir}/PyQt5
199 %attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so
201 %files -n python3-sip-devel
202 %defattr(644,root,root,755)
203 %{py3_sitedir}/sipconfig.py
204 %{py3_sitedir}/sipdistutils.py
205 %{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
206 %{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
207 %{py3_sitedir}/PyQt5/sip.pyi