]> git.pld-linux.org Git - packages/sip.git/blame - sip.spec
up to 4.19.21
[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
393015f7 9Version: 4.19.21
dfab31ce 10Release: 1
39232d42 11Epoch: 2
1c28206b 12License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
183bd075 13Group: Development/Languages/Python
7ce55b35 14Source0: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/%{name}-%{version}.tar.gz
393015f7 15# Source0-md5: dad2afc3d8dfc0d681f3cb87eb2e55aa
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
6e8f53ed
JB
50%package -n python-sip-devel
51Summary: Python 2 development files needed to build bindings using SIP
52Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
53Group: Development/Libraries
54Requires: %{name} = %{epoch}:%{version}-%{release}
55Requires: python-devel >= 1:2.3
56
57%description -n python-sip-devel
58Python 2 development files needed to build bindings for C++ classes
59using SIP.
60
61%description -n python-sip-devel -l pl.UTF-8
62Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
63C++ przy użyciu SIP-a.
64
89f5b166 65%package -n python-PyQt5-sip
6e8f53ed
JB
66Summary: Python 2 module needed by SIP generated bindings for PyQt5
67Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP dla PyQt5
89f5b166
JR
68Group: Libraries/Python
69Requires: python-libs
70
71%description -n python-PyQt5-sip
72SIP generates Python bindings for C++ class libraries from a set of
73class specification files. This package includes Python 2 runtime
6e8f53ed 74library needed by all generated bindings for PyQt5.
89f5b166
JR
75
76%description -n python-PyQt5-sip -l pl.UTF-8
77SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
78plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
6e8f53ed 79potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
89f5b166 80
6e8f53ed
JB
81%package -n python-PyQt5-sip-devel
82Summary: Python 2 development files needed to build bindings for PyQt5 using SIP
83Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a
9e00b3d2 84Group: Development/Libraries
57fb065a 85Requires: python-PyQt5-sip = %{epoch}:%{version}-%{release}
6e8f53ed 86Requires: python-sip-devel = %{epoch}:%{version}-%{release}
9e00b3d2 87
6e8f53ed 88%description -n python-PyQt5-sip-devel
4c693150 89Python 2 development files needed to build bindings for C++ classes
6e8f53ed 90for PyQt5 using SIP.
9e00b3d2 91
6e8f53ed 92%description -n python-PyQt5-sip-devel -l pl.UTF-8
4c693150 93Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
6e8f53ed 94C++ dla PyQt5 przy użyciu SIP-a.
4c693150
JB
95
96%package -n python3-sip
97Summary: Python 3 module needed by SIP generated bindings
98Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
99Group: Libraries/Python
100Requires: python3-libs
101
102%description -n python3-sip
103SIP generates Python bindings for C++ class libraries from a set of
104class specification files. This package includes Python 3 runtime
105library needed by all generated bindings.
106
107%description -n python3-sip -l pl.UTF-8
108SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
109plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
110potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
111
6e8f53ed
JB
112%package -n python3-sip-devel
113Summary: Python 3 development files needed to build bindings using SIP
114Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
115Group: Development/Libraries
116Requires: %{name} = %{epoch}:%{version}-%{release}
117Requires: python3-sip = %{epoch}:%{version}-%{release}
118Requires: python3-devel >= 1:3.2
119
120%description -n python3-sip-devel
121Python 3 development files needed to build bindings for C++ classes
122using SIP.
123
124%description -n python3-sip-devel -l pl.UTF-8
125Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
126C++ przy użyciu SIP-a.
127
89f5b166 128%package -n python3-PyQt5-sip
6e8f53ed
JB
129Summary: Python 3 module needed by SIP generated bindings for PyQt5
130Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP dla PyQt5
89f5b166
JR
131Group: Libraries/Python
132Requires: python3-libs
133
134%description -n python3-PyQt5-sip
135SIP generates Python bindings for C++ class libraries from a set of
6e8f53ed
JB
136class specification files. This package includes Python 2 runtime
137library needed by all generated bindings for PyQt5.
89f5b166
JR
138
139%description -n python3-PyQt5-sip -l pl.UTF-8
140SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
6e8f53ed
JB
141plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
142potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
89f5b166 143
6e8f53ed
JB
144%package -n python3-PyQt5-sip-devel
145Summary: Python 3 development files needed to build bindings for PyQt5 using SIP
146Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a
4c693150 147Group: Development/Libraries
57fb065a 148Requires: python3-PyQt5-sip = %{epoch}:%{version}-%{release}
6e8f53ed 149Requires: python3-sip-devel = %{epoch}:%{version}-%{release}
4c693150 150
6e8f53ed 151%description -n python3-PyQt5-sip-devel
4c693150 152Python 3 development files needed to build bindings for C++ classes
6e8f53ed 153for PyQt5 using SIP.
4c693150 154
6e8f53ed 155%description -n python3-PyQt5-sip-devel -l pl.UTF-8
4c693150 156Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
6e8f53ed 157C++ dla PyQt5 przy użyciu SIP-a.
9e00b3d2 158
183bd075 159%prep
16564698 160%setup -q
183bd075 161
162%build
f7707c80
JB
163# configure.py notes:
164# - macros overrides must be last
165# - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
4c693150
JB
166
167%if %{with python2}
168install -d build-py2
169cd build-py2
89f5b166
JR
170%{__python} ../configure.py \
171 -b %{_bindir} \
172 -e %{py_incdir} \
173 -v %{_sipfilesdir} \
174 -d %{py_sitedir} \
175 CC="%{__cc}" \
176 CXX="%{__cxx}" \
177 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
178 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
179 LINK="%{__cxx}" \
180 LINK_SHLIB="%{__cxx}"
181
182%{__make}
183cd ..
184
185install -d build-py2-PyQt5
186cd build-py2-PyQt5
4c693150 187%{__python} ../configure.py \
c0d3d5be 188 --sip-module=PyQt5.sip \
f7707c80 189 -b %{_bindir} \
21ced613 190 -e %{py_incdir} \
8df445fb 191 -v %{_sipfilesdir} \
db24e112 192 -d %{py_sitedir} \
dd4053c2 193 CC="%{__cc}" \
f7707c80 194 CXX="%{__cxx}" \
751a9b24
AM
195 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
196 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
8df445fb
KK
197 LINK="%{__cxx}" \
198 LINK_SHLIB="%{__cxx}"
199
200%{__make}
4c693150
JB
201cd ..
202%endif
203
204%if %{with python3}
205install -d build-py3
206cd build-py3
89f5b166
JR
207%{__python3} ../configure.py \
208 -b %{_bindir} \
209 -e %{py3_incdir} \
210 -v %{_sipfilesdir} \
211 -d %{py3_sitedir} \
212 CC="%{__cc}" \
213 CXX="%{__cxx}" \
214 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
215 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
216 LINK="%{__cxx}" \
217 LINK_SHLIB="%{__cxx}"
218
219%{__make}
220cd ..
221
222install -d build-py3-PyQt5
223cd build-py3-PyQt5
4c693150 224%{__python3} ../configure.py \
c0d3d5be 225 --sip-module=PyQt5.sip \
4c693150
JB
226 -b %{_bindir} \
227 -e %{py3_incdir} \
228 -v %{_sipfilesdir} \
229 -d %{py3_sitedir} \
230 CC="%{__cc}" \
231 CXX="%{__cxx}" \
232 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
233 CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
234 LINK="%{__cxx}" \
235 LINK_SHLIB="%{__cxx}"
236
237%{__make}
238cd ..
239%endif
183bd075 240
241%install
21ced613 242rm -rf $RPM_BUILD_ROOT
21ced613 243install -d $RPM_BUILD_ROOT%{_sipfilesdir}
183bd075 244
4c693150 245%if %{with python2}
d25da5ca 246%{__make} -C build-py2 install \
15e0c203
JB
247 DESTDIR=$RPM_BUILD_ROOT
248
d25da5ca 249%{__make} -C build-py2-PyQt5 install \
89f5b166
JR
250 DESTDIR=$RPM_BUILD_ROOT
251
f2b32c00
JB
252%py_comp $RPM_BUILD_ROOT%{py_sitedir}
253%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
6e8f53ed 254%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/{sip,PyQt5_sip}-%{version}.dist-info
4c693150
JB
255%endif
256
257%if %{with python3}
d25da5ca 258%{__make} -C build-py3 install \
4c693150 259 DESTDIR=$RPM_BUILD_ROOT
15201a5b 260
d25da5ca 261%{__make} -C build-py3-PyQt5 install \
89f5b166
JR
262 DESTDIR=$RPM_BUILD_ROOT
263
15201a5b
JB
264%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
265%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
6e8f53ed 266%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/{sip,PyQt5_sip}-%{version}.dist-info
4c693150 267%endif
7048cca3 268
183bd075 269%clean
270rm -rf $RPM_BUILD_ROOT
271
272%files
273%defattr(644,root,root,755)
7048cca3
JB
274%doc LICENSE NEWS README doc/html
275%attr(755,root,root) %{_bindir}/sip
4c693150 276%dir %{_sipfilesdir}
7143dd0b 277
4c693150 278%if %{with python2}
9e00b3d2
KK
279%files -n python-sip
280%defattr(644,root,root,755)
89f5b166
JR
281%attr(755,root,root) %{py_sitedir}/sip.so
282
9e00b3d2 283%files -n python-sip-devel
7143dd0b 284%defattr(644,root,root,755)
f2b32c00
JB
285%{py_sitedir}/sipconfig.py
286%{py_sitedir}/sipconfig.py[co]
287%{py_sitedir}/sipdistutils.py
288%{py_sitedir}/sipdistutils.py[co]
57fb065a 289%{py_sitedir}/sip.pyi
7048cca3 290%{py_incdir}/sip.h
6e8f53ed
JB
291
292%files -n python-PyQt5-sip
293%defattr(644,root,root,755)
294%dir %{py_sitedir}/PyQt5
295%attr(755,root,root) %{py_sitedir}/PyQt5/sip.so
296
297%files -n python-PyQt5-sip-devel
298%defattr(644,root,root,755)
299%{py_sitedir}/PyQt5/sip.pyi
4c693150
JB
300%endif
301
302%if %{with python3}
303%files -n python3-sip
304%defattr(644,root,root,755)
89f5b166
JR
305%attr(755,root,root) %{py3_sitedir}/sip.so
306
4c693150
JB
307%files -n python3-sip-devel
308%defattr(644,root,root,755)
309%{py3_sitedir}/sipconfig.py
310%{py3_sitedir}/sipdistutils.py
15201a5b
JB
311%{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
312%{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
57fb065a 313%{py3_sitedir}/sip.pyi
4c693150 314%{py3_incdir}/sip.h
6e8f53ed
JB
315
316%files -n python3-PyQt5-sip
317%defattr(644,root,root,755)
318%dir %{py3_sitedir}/PyQt5
319%attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so
320
321%files -n python3-PyQt5-sip-devel
322%defattr(644,root,root,755)
323%{py3_sitedir}/PyQt5/sip.pyi
4c693150 324%endif
This page took 0.133951 seconds and 4 git commands to generate.