1 # TODO: __pycache__ for python3-sip-devel
4 %bcond_without python2 # CPython 2.x modules
5 %bcond_without python3 # CPython 3.x modules
7 Summary: Python bindings generator for C++ class libraries
8 Summary(pl.UTF-8): Generator powiązań Pythona z bibliotekami klas C++
13 License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
14 Group: Development/Languages/Python
15 Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz
16 # Source0-md5: ca51677770fa62dd5087877688cf97ba
17 Patch0: %{name}-outoftree.patch
18 URL: http://www.riverbankcomputing.com/software/sip/
19 BuildRequires: libstdc++-devel
20 BuildRequires: python-devel >= 1:2.3
21 BuildRequires: python3-devel >= 1:3.2
22 BuildRequires: rpm-pythonprov
23 BuildRequires: rpmbuild(macros) >= 1.167
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _sipfilesdir %{_datadir}/sip
29 SIP generates Python bindings for C++ class libraries from a set of
30 class specification files. It supports Python v2 and v3.
32 %description -l pl.UTF-8
33 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
34 plików ze specyfikacjami klas. Obsługiwany jest Python 2 i 3.
36 %package -n python-sip
37 Summary: Python 2 module needed by SIP generated bindings
38 Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
39 Group: Libraries/Python
42 %description -n python-sip
43 SIP generates Python bindings for C++ class libraries from a set of
44 class specification files. This package includes Python 2 runtime
45 library needed by all generated bindings.
47 %description -n python-sip -l pl.UTF-8
48 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
49 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
50 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
52 %package -n python-sip-devel
53 Summary: Python 2 development files needed to build bindings using SIP
54 Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
55 Group: Development/Libraries
56 Requires: %{name} = %{epoch}:%{version}-%{release}
57 Requires: python-devel >= 1:2.3
59 %description -n python-sip-devel
60 Python 2 development files needed to build bindings for C++ classes
63 %description -n python-sip-devel -l pl.UTF-8
64 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
65 C++ przy użyciu SIP-a.
67 %package -n python3-sip
68 Summary: Python 3 module needed by SIP generated bindings
69 Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
70 Group: Libraries/Python
71 Requires: python3-libs
73 %description -n python3-sip
74 SIP generates Python bindings for C++ class libraries from a set of
75 class specification files. This package includes Python 3 runtime
76 library needed by all generated bindings.
78 %description -n python3-sip -l pl.UTF-8
79 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
80 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
81 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
83 %package -n python3-sip-devel
84 Summary: Python 3 development files needed to build bindings using SIP
85 Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
86 Group: Development/Libraries
87 Requires: %{name} = %{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.
103 # configure.py notes:
104 # - macros overrides must be last
105 # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
110 %{__python} ../configure.py \
117 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
118 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
120 LINK_SHLIB="%{__cxx}"
129 %{__python3} ../configure.py \
136 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
137 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
139 LINK_SHLIB="%{__cxx}"
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT%{_sipfilesdir}
150 %{__make} -C build-py2 install \
151 DESTDIR=$RPM_BUILD_ROOT
153 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
154 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
158 %{__make} -C build-py3 install \
159 DESTDIR=$RPM_BUILD_ROOT
163 rm -rf $RPM_BUILD_ROOT
166 %defattr(644,root,root,755)
167 %doc LICENSE NEWS README doc/html
168 %attr(755,root,root) %{_bindir}/sip
173 %defattr(644,root,root,755)
174 %attr(755,root,root) %{py_sitedir}/sip.so
176 %files -n python-sip-devel
177 %defattr(644,root,root,755)
178 %{py_sitedir}/sipconfig.py
179 %{py_sitedir}/sipconfig.py[co]
180 %{py_sitedir}/sipdistutils.py
181 %{py_sitedir}/sipdistutils.py[co]
186 %files -n python3-sip
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{py3_sitedir}/sip.so
190 %files -n python3-sip-devel
191 %defattr(644,root,root,755)
192 %{py3_sitedir}/sipconfig.py
193 %{py3_sitedir}/sipdistutils.py