]>
Commit | Line | Data |
---|---|---|
4c693150 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x modules | |
4 | %bcond_without python3 # CPython 3.x modules | |
5 | ||
4d6e5f32 | 6 | Summary: Python bindings generator for C++ class libraries |
8bf916ba | 7 | Summary(pl.UTF-8): Generator powiązań Pythona z bibliotekami klas C++ |
183bd075 | 8 | Name: sip |
02ea3c44 | 9 | Version: 4.19.12 |
89f5b166 | 10 | Release: 5 |
39232d42 | 11 | Epoch: 2 |
1c28206b | 12 | License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3 |
183bd075 | 13 | Group: Development/Languages/Python |
1c28206b | 14 | Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz |
02ea3c44 | 15 | # Source0-md5: e28b0790dfe4962ce6bbd7c4772f40c9 |
b4641a2f | 16 | URL: http://www.riverbankcomputing.com/software/sip/ |
ba9c55ee | 17 | BuildRequires: libstdc++-devel |
a0ffe2f5 JB |
18 | BuildRequires: python-devel >= 1:2.3 |
19 | BuildRequires: python3-devel >= 1:3.2 | |
bfdf8b01 | 20 | BuildRequires: rpm-pythonprov |
ba9c55ee | 21 | BuildRequires: rpmbuild(macros) >= 1.167 |
ac08bdef | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
183bd075 | 23 | |
7f2259e9 JB |
24 | %define _sipfilesdir %{_datadir}/sip |
25 | ||
183bd075 | 26 | %description |
4c693150 JB |
27 | SIP generates Python bindings for C++ class libraries from a set of |
28 | class specification files. It supports Python v2 and v3. | |
183bd075 | 29 | |
dd6dda9e | 30 | %description -l pl.UTF-8 |
4c693150 JB |
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. | |
7143dd0b | 33 | |
7143dd0b | 34 | %package -n python-sip |
4c693150 JB |
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 | |
7143dd0b | 37 | Group: Libraries/Python |
4c693150 | 38 | Requires: python-libs |
7143dd0b KK |
39 | |
40 | %description -n python-sip | |
4c693150 JB |
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. | |
7143dd0b | 44 | |
dd6dda9e | 45 | %description -n python-sip -l pl.UTF-8 |
4c693150 JB |
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ń. | |
183bd075 | 49 | |
89f5b166 JR |
50 | %package -n python-PyQt5-sip |
51 | Summary: Python 2 module needed by SIP generated bindings | |
52 | Summary(pl.UTF-8): Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP | |
53 | Group: Libraries/Python | |
54 | Requires: python-libs | |
55 | ||
56 | %description -n python-PyQt5-sip | |
57 | SIP generates Python bindings for C++ class libraries from a set of | |
58 | class specification files. This package includes Python 2 runtime | |
59 | library needed by all generated bindings. | |
60 | ||
61 | PyQt5 private copy. | |
62 | ||
63 | %description -n python-PyQt5-sip -l pl.UTF-8 | |
64 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru | |
65 | plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2 | |
66 | potrzebną do uruchomienia wszystkich wygenerowanych powiązań. | |
67 | ||
68 | Prywatna kopia PyQt5. | |
69 | ||
9e00b3d2 | 70 | %package -n python-sip-devel |
4c693150 JB |
71 | Summary: Python 2 development files needed to build bindings using SIP |
72 | Summary(pl.UTF-8): Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a | |
9e00b3d2 KK |
73 | Group: Development/Libraries |
74 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
d6a42ff9 | 75 | Requires: python-sip = %{epoch}:%{version}-%{release} |
a0ffe2f5 | 76 | Requires: python-devel >= 1:2.3 |
9e00b3d2 KK |
77 | |
78 | %description -n python-sip-devel | |
4c693150 JB |
79 | Python 2 development files needed to build bindings for C++ classes |
80 | using SIP. | |
9e00b3d2 | 81 | |
dd6dda9e | 82 | %description -n python-sip-devel -l pl.UTF-8 |
4c693150 JB |
83 | Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas |
84 | C++ przy użyciu SIP-a. | |
85 | ||
86 | %package -n python3-sip | |
87 | Summary: Python 3 module needed by SIP generated bindings | |
88 | Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP | |
89 | Group: Libraries/Python | |
90 | Requires: python3-libs | |
91 | ||
92 | %description -n python3-sip | |
93 | SIP generates Python bindings for C++ class libraries from a set of | |
94 | class specification files. This package includes Python 3 runtime | |
95 | library needed by all generated bindings. | |
96 | ||
97 | %description -n python3-sip -l pl.UTF-8 | |
98 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru | |
99 | plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3 | |
100 | potrzebną do uruchomienia wszystkich wygenerowanych powiązań. | |
101 | ||
89f5b166 JR |
102 | %package -n python3-PyQt5-sip |
103 | Summary: Python 3 module needed by SIP generated bindings | |
104 | Summary(pl.UTF-8): Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP | |
105 | Group: Libraries/Python | |
106 | Requires: python3-libs | |
107 | ||
108 | %description -n python3-PyQt5-sip | |
109 | SIP generates Python bindings for C++ class libraries from a set of | |
110 | class specification files. This package includes Python 3 runtime | |
111 | library needed by all generated bindings. | |
112 | ||
113 | PyQt5 private copy. | |
114 | ||
115 | %description -n python3-PyQt5-sip -l pl.UTF-8 | |
116 | SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru | |
117 | plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3 | |
118 | potrzebną do uruchomienia wszystkich wygenerowanych powiązań. | |
119 | ||
120 | Prywatna kopia PyQt5. | |
121 | ||
4c693150 JB |
122 | %package -n python3-sip-devel |
123 | Summary: Python 3 development files needed to build bindings using SIP | |
124 | Summary(pl.UTF-8): Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a | |
125 | Group: Development/Libraries | |
126 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
d6a42ff9 | 127 | Requires: python3-sip = %{epoch}:%{version}-%{release} |
4c693150 JB |
128 | Requires: python3-devel >= 1:3.2 |
129 | ||
130 | %description -n python3-sip-devel | |
131 | Python 3 development files needed to build bindings for C++ classes | |
132 | using SIP. | |
133 | ||
134 | %description -n python3-sip-devel -l pl.UTF-8 | |
135 | Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas | |
136 | C++ 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} | |
147 | install -d build-py2 | |
148 | cd 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} | |
162 | cd .. | |
163 | ||
164 | install -d build-py2-PyQt5 | |
165 | cd 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 |
180 | cd .. |
181 | %endif | |
182 | ||
183 | %if %{with python3} | |
184 | install -d build-py3 | |
185 | cd 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} | |
199 | cd .. | |
200 | ||
201 | install -d build-py3-PyQt5 | |
202 | cd 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} | |
217 | cd .. | |
218 | %endif | |
183bd075 | 219 | |
220 | %install | |
21ced613 | 221 | rm -rf $RPM_BUILD_ROOT |
21ced613 | 222 | install -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 |
247 | rm -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 |