]> git.pld-linux.org Git - packages/sip.git/blame - sip.spec
- build non-QT namespaced python modules
[packages/sip.git] / sip.spec
CommitLineData
4c693150
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x modules
4%bcond_without python3 # CPython 3.x modules
5
4d6e5f32 6Summary: Python bindings generator for C++ class libraries
8bf916ba 7Summary(pl.UTF-8): Generator powiązań Pythona z bibliotekami klas C++
183bd075 8Name: sip
02ea3c44 9Version: 4.19.12
89f5b166 10Release: 5
39232d42 11Epoch: 2
1c28206b 12License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
183bd075 13Group: Development/Languages/Python
1c28206b 14Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz
02ea3c44 15# Source0-md5: e28b0790dfe4962ce6bbd7c4772f40c9
b4641a2f 16URL: http://www.riverbankcomputing.com/software/sip/
ba9c55ee 17BuildRequires: libstdc++-devel
a0ffe2f5
JB
18BuildRequires: python-devel >= 1:2.3
19BuildRequires: python3-devel >= 1:3.2
bfdf8b01 20BuildRequires: rpm-pythonprov
ba9c55ee 21BuildRequires: rpmbuild(macros) >= 1.167
ac08bdef 22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
183bd075 23
7f2259e9
JB
24%define _sipfilesdir %{_datadir}/sip
25
183bd075 26%description
4c693150
JB
27SIP generates Python bindings for C++ class libraries from a set of
28class specification files. It supports Python v2 and v3.
183bd075 29
dd6dda9e 30%description -l pl.UTF-8
4c693150
JB
31SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
32plików ze specyfikacjami klas. Obsługiwany jest Python 2 i 3.
7143dd0b 33
7143dd0b 34%package -n python-sip
4c693150
JB
35Summary: Python 2 module needed by SIP generated bindings
36Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
7143dd0b 37Group: Libraries/Python
4c693150 38Requires: python-libs
7143dd0b
KK
39
40%description -n python-sip
4c693150
JB
41SIP generates Python bindings for C++ class libraries from a set of
42class specification files. This package includes Python 2 runtime
43library needed by all generated bindings.
7143dd0b 44
dd6dda9e 45%description -n python-sip -l pl.UTF-8
4c693150
JB
46SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
47plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
48potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
183bd075 49
89f5b166
JR
50%package -n python-PyQt5-sip
51Summary: Python 2 module needed by SIP generated bindings
52Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
53Group: Libraries/Python
54Requires: python-libs
55
56%description -n python-PyQt5-sip
57SIP generates Python bindings for C++ class libraries from a set of
58class specification files. This package includes Python 2 runtime
59library needed by all generated bindings.
60
61PyQt5 private copy.
62
63%description -n python-PyQt5-sip -l pl.UTF-8
64SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
65plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
66potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
67
68Prywatna kopia PyQt5.
69
9e00b3d2 70%package -n python-sip-devel
4c693150
JB
71Summary: Python 2 development files needed to build bindings using SIP
72Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
9e00b3d2
KK
73Group: Development/Libraries
74Requires: %{name} = %{epoch}:%{version}-%{release}
d6a42ff9 75Requires: python-sip = %{epoch}:%{version}-%{release}
a0ffe2f5 76Requires: python-devel >= 1:2.3
9e00b3d2
KK
77
78%description -n python-sip-devel
4c693150
JB
79Python 2 development files needed to build bindings for C++ classes
80using SIP.
9e00b3d2 81
dd6dda9e 82%description -n python-sip-devel -l pl.UTF-8
4c693150
JB
83Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
84C++ przy użyciu SIP-a.
85
86%package -n python3-sip
87Summary: Python 3 module needed by SIP generated bindings
88Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
89Group: Libraries/Python
90Requires: python3-libs
91
92%description -n python3-sip
93SIP generates Python bindings for C++ class libraries from a set of
94class specification files. This package includes Python 3 runtime
95library needed by all generated bindings.
96
97%description -n python3-sip -l pl.UTF-8
98SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
99plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
100potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
101
89f5b166
JR
102%package -n python3-PyQt5-sip
103Summary: Python 3 module needed by SIP generated bindings
104Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
105Group: Libraries/Python
106Requires: python3-libs
107
108%description -n python3-PyQt5-sip
109SIP generates Python bindings for C++ class libraries from a set of
110class specification files. This package includes Python 3 runtime
111library needed by all generated bindings.
112
113PyQt5 private copy.
114
115%description -n python3-PyQt5-sip -l pl.UTF-8
116SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
117plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
118potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
119
120Prywatna kopia PyQt5.
121
4c693150
JB
122%package -n python3-sip-devel
123Summary: Python 3 development files needed to build bindings using SIP
124Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
125Group: Development/Libraries
126Requires: %{name} = %{epoch}:%{version}-%{release}
d6a42ff9 127Requires: python3-sip = %{epoch}:%{version}-%{release}
4c693150
JB
128Requires: python3-devel >= 1:3.2
129
130%description -n python3-sip-devel
131Python 3 development files needed to build bindings for C++ classes
132using SIP.
133
134%description -n python3-sip-devel -l pl.UTF-8
135Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
136C++ przy użyciu SIP-a.
9e00b3d2 137
183bd075 138%prep
16564698 139%setup -q
183bd075 140
141%build
f7707c80
JB
142# configure.py notes:
143# - macros overrides must be last
144# - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
4c693150
JB
145
146%if %{with python2}
147install -d build-py2
148cd build-py2
89f5b166
JR
149%{__python} ../configure.py \
150 -b %{_bindir} \
151 -e %{py_incdir} \
152 -v %{_sipfilesdir} \
153 -d %{py_sitedir} \
154 CC="%{__cc}" \
155 CXX="%{__cxx}" \
156 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
157 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
158 LINK="%{__cxx}" \
159 LINK_SHLIB="%{__cxx}"
160
161%{__make}
162cd ..
163
164install -d build-py2-PyQt5
165cd build-py2-PyQt5
4c693150 166%{__python} ../configure.py \
c0d3d5be 167 --sip-module=PyQt5.sip \
f7707c80 168 -b %{_bindir} \
21ced613 169 -e %{py_incdir} \
8df445fb 170 -v %{_sipfilesdir} \
db24e112 171 -d %{py_sitedir} \
dd4053c2 172 CC="%{__cc}" \
f7707c80 173 CXX="%{__cxx}" \
751a9b24
AM
174 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
175 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
8df445fb
KK
176 LINK="%{__cxx}" \
177 LINK_SHLIB="%{__cxx}"
178
179%{__make}
4c693150
JB
180cd ..
181%endif
182
183%if %{with python3}
184install -d build-py3
185cd build-py3
89f5b166
JR
186%{__python3} ../configure.py \
187 -b %{_bindir} \
188 -e %{py3_incdir} \
189 -v %{_sipfilesdir} \
190 -d %{py3_sitedir} \
191 CC="%{__cc}" \
192 CXX="%{__cxx}" \
193 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
194 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
195 LINK="%{__cxx}" \
196 LINK_SHLIB="%{__cxx}"
197
198%{__make}
199cd ..
200
201install -d build-py3-PyQt5
202cd build-py3-PyQt5
4c693150 203%{__python3} ../configure.py \
c0d3d5be 204 --sip-module=PyQt5.sip \
4c693150
JB
205 -b %{_bindir} \
206 -e %{py3_incdir} \
207 -v %{_sipfilesdir} \
208 -d %{py3_sitedir} \
209 CC="%{__cc}" \
210 CXX="%{__cxx}" \
211 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
212 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
213 LINK="%{__cxx}" \
214 LINK_SHLIB="%{__cxx}"
215
216%{__make}
217cd ..
218%endif
183bd075 219
220%install
21ced613 221rm -rf $RPM_BUILD_ROOT
21ced613 222install -d $RPM_BUILD_ROOT%{_sipfilesdir}
183bd075 223
4c693150
JB
224%if %{with python2}
225%{__make} -C build-py2 install \
15e0c203
JB
226 DESTDIR=$RPM_BUILD_ROOT
227
89f5b166
JR
228%{__make} -C build-py2-PyQt5 install \
229 DESTDIR=$RPM_BUILD_ROOT
230
f2b32c00
JB
231%py_comp $RPM_BUILD_ROOT%{py_sitedir}
232%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
4c693150
JB
233%endif
234
235%if %{with python3}
236%{__make} -C build-py3 install \
237 DESTDIR=$RPM_BUILD_ROOT
15201a5b 238
89f5b166
JR
239%{__make} -C build-py3-PyQt5 install \
240 DESTDIR=$RPM_BUILD_ROOT
241
15201a5b
JB
242%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
243%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
4c693150 244%endif
7048cca3 245
183bd075 246%clean
247rm -rf $RPM_BUILD_ROOT
248
249%files
250%defattr(644,root,root,755)
7048cca3
JB
251%doc LICENSE NEWS README doc/html
252%attr(755,root,root) %{_bindir}/sip
4c693150 253%dir %{_sipfilesdir}
7143dd0b 254
4c693150 255%if %{with python2}
9e00b3d2
KK
256%files -n python-sip
257%defattr(644,root,root,755)
89f5b166
JR
258%attr(755,root,root) %{py_sitedir}/sip.so
259
260%files -n python-PyQt5-sip
261%defattr(644,root,root,755)
c0d3d5be
AM
262%dir %{py_sitedir}/PyQt5
263%attr(755,root,root) %{py_sitedir}/PyQt5/sip.so
9e00b3d2
KK
264
265%files -n python-sip-devel
7143dd0b 266%defattr(644,root,root,755)
f2b32c00
JB
267%{py_sitedir}/sipconfig.py
268%{py_sitedir}/sipconfig.py[co]
269%{py_sitedir}/sipdistutils.py
270%{py_sitedir}/sipdistutils.py[co]
c0d3d5be 271%{py_sitedir}/PyQt5/sip.pyi
7048cca3 272%{py_incdir}/sip.h
4c693150
JB
273%endif
274
275%if %{with python3}
276%files -n python3-sip
277%defattr(644,root,root,755)
89f5b166
JR
278%attr(755,root,root) %{py3_sitedir}/sip.so
279
280%files -n python3-PyQt5-sip
281%defattr(644,root,root,755)
c0d3d5be
AM
282%dir %{py3_sitedir}/PyQt5
283%attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so
4c693150
JB
284
285%files -n python3-sip-devel
286%defattr(644,root,root,755)
287%{py3_sitedir}/sipconfig.py
288%{py3_sitedir}/sipdistutils.py
15201a5b
JB
289%{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
290%{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
c0d3d5be 291%{py3_sitedir}/PyQt5/sip.pyi
4c693150
JB
292%{py3_incdir}/sip.h
293%endif
This page took 0.081495 seconds and 4 git commands to generate.