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: 884d60b6f17fc5b910da4665caf6fd85
17 Patch0: %{name}-outoftree.patch
18 URL: http://www.riverbankcomputing.com/software/sip/
19 BuildRequires: libstdc++-devel
20 BuildRequires: python-devel >= 2.3
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.167
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _sipfilesdir %{_datadir}/sip
28 SIP generates Python bindings for C++ class libraries from a set of
29 class specification files. It supports Python v2 and v3.
31 %description -l pl.UTF-8
32 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
33 plików ze specyfikacjami klas. Obsługiwany jest Python 2 i 3.
35 %package -n python-sip
36 Summary: Python 2 module needed by SIP generated bindings
37 Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
38 Group: Libraries/Python
41 %description -n python-sip
42 SIP generates Python bindings for C++ class libraries from a set of
43 class specification files. This package includes Python 2 runtime
44 library needed by all generated bindings.
46 %description -n python-sip -l pl.UTF-8
47 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
48 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
49 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
51 %package -n python-sip-devel
52 Summary: Python 2 development files needed to build bindings using SIP
53 Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
54 Group: Development/Libraries
55 Requires: %{name} = %{epoch}:%{version}-%{release}
56 Requires: python-devel >= 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-devel >= 1:3.2
89 %description -n python3-sip-devel
90 Python 3 development files needed to build bindings for C++ classes
93 %description -n python3-sip-devel -l pl.UTF-8
94 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
95 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 \
116 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
117 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
119 LINK_SHLIB="%{__cxx}"
128 %{__python3} ../configure.py \
135 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
136 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
138 LINK_SHLIB="%{__cxx}"
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT%{_sipfilesdir}
149 %{__make} -C build-py2 install \
150 DESTDIR=$RPM_BUILD_ROOT
152 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
153 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
157 %{__make} -C build-py3 install \
158 DESTDIR=$RPM_BUILD_ROOT
162 rm -rf $RPM_BUILD_ROOT
165 %defattr(644,root,root,755)
166 %doc LICENSE NEWS README doc/html
167 %attr(755,root,root) %{_bindir}/sip
172 %defattr(644,root,root,755)
173 %attr(755,root,root) %{py_sitedir}/sip.so
175 %files -n python-sip-devel
176 %defattr(644,root,root,755)
177 %{py_sitedir}/sipconfig.py
178 %{py_sitedir}/sipconfig.py[co]
179 %{py_sitedir}/sipdistutils.py
180 %{py_sitedir}/sipdistutils.py[co]
185 %files -n python3-sip
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{py3_sitedir}/sip.so
189 %files -n python3-sip-devel
190 %defattr(644,root,root,755)
191 %{py3_sitedir}/sipconfig.py
192 %{py3_sitedir}/sipdistutils.py