]>
Commit | Line | Data |
---|---|---|
4c693150 JB |
1 | # TODO: __pycache__ for python3-sip-devel |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without python2 # CPython 2.x modules | |
5 | %bcond_without python3 # CPython 3.x modules | |
6 | ||
4d6e5f32 | 7 | Summary: Python bindings generator for C++ class libraries |
8bf916ba | 8 | Summary(pl.UTF-8): Generator powiązań Pythona z bibliotekami klas C++ |
183bd075 | 9 | Name: sip |
756ecdce | 10 | Version: 4.16.3 |
f52b964d | 11 | Release: 1 |
39232d42 | 12 | Epoch: 2 |
1c28206b | 13 | License: SIP (redistributable, see LICENSE) or GPL v2 or GPL v3 |
183bd075 | 14 | Group: Development/Languages/Python |
1c28206b | 15 | Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz |
756ecdce | 16 | # Source0-md5: 884d60b6f17fc5b910da4665caf6fd85 |
4c693150 | 17 | Patch0: %{name}-outoftree.patch |
b4641a2f | 18 | URL: http://www.riverbankcomputing.com/software/sip/ |
ba9c55ee | 19 | BuildRequires: libstdc++-devel |
bfdf8b01 | 20 | BuildRequires: python-devel >= 2.3 |
bfdf8b01 | 21 | BuildRequires: rpm-pythonprov |
ba9c55ee | 22 | BuildRequires: rpmbuild(macros) >= 1.167 |
ac08bdef | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
183bd075 | 24 | |
7f2259e9 JB |
25 | %define _sipfilesdir %{_datadir}/sip |
26 | ||
183bd075 | 27 | %description |
4c693150 JB |
28 | SIP generates Python bindings for C++ class libraries from a set of |
29 | class specification files. It supports Python v2 and v3. | |
183bd075 | 30 | |
dd6dda9e | 31 | %description -l pl.UTF-8 |
4c693150 JB |
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. | |
7143dd0b | 34 | |
7143dd0b | 35 | %package -n python-sip |
4c693150 JB |
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 | |
7143dd0b | 38 | Group: Libraries/Python |
4c693150 | 39 | Requires: python-libs |
7143dd0b KK |
40 | |
41 | %description -n python-sip | |
4c693150 JB |
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. | |
7143dd0b | 45 | |
dd6dda9e | 46 | %description -n python-sip -l pl.UTF-8 |
4c693150 JB |
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ń. | |
183bd075 | 50 | |
9e00b3d2 | 51 | %package -n python-sip-devel |
4c693150 JB |
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 | |
9e00b3d2 KK |
54 | Group: Development/Libraries |
55 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
56 | Requires: python-devel >= 2.3 | |
9e00b3d2 KK |
57 | |
58 | %description -n python-sip-devel | |
4c693150 JB |
59 | Python 2 development files needed to build bindings for C++ classes |
60 | using SIP. | |
9e00b3d2 | 61 | |
dd6dda9e | 62 | %description -n python-sip-devel -l pl.UTF-8 |
4c693150 JB |
63 | Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas |
64 | C++ przy użyciu SIP-a. | |
65 | ||
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 | |
71 | ||
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. | |
76 | ||
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ń. | |
81 | ||
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 | |
88 | ||
89 | %description -n python3-sip-devel | |
90 | Python 3 development files needed to build bindings for C++ classes | |
91 | using SIP. | |
92 | ||
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. | |
9e00b3d2 | 96 | |
183bd075 | 97 | %prep |
16564698 | 98 | %setup -q |
4c693150 | 99 | %patch0 -p1 |
183bd075 | 100 | |
101 | %build | |
f7707c80 JB |
102 | # configure.py notes: |
103 | # - macros overrides must be last | |
104 | # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags | |
4c693150 JB |
105 | |
106 | %if %{with python2} | |
107 | install -d build-py2 | |
108 | cd build-py2 | |
109 | %{__python} ../configure.py \ | |
f7707c80 | 110 | -b %{_bindir} \ |
21ced613 | 111 | -e %{py_incdir} \ |
8df445fb | 112 | -v %{_sipfilesdir} \ |
db24e112 | 113 | -d %{py_sitedir} \ |
dd4053c2 | 114 | CC="%{__cc}" \ |
f7707c80 | 115 | CXX="%{__cxx}" \ |
751a9b24 AM |
116 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
117 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
8df445fb KK |
118 | LINK="%{__cxx}" \ |
119 | LINK_SHLIB="%{__cxx}" | |
120 | ||
121 | %{__make} | |
4c693150 JB |
122 | cd .. |
123 | %endif | |
124 | ||
125 | %if %{with python3} | |
126 | install -d build-py3 | |
127 | cd build-py3 | |
128 | %{__python3} ../configure.py \ | |
129 | -b %{_bindir} \ | |
130 | -e %{py3_incdir} \ | |
131 | -v %{_sipfilesdir} \ | |
132 | -d %{py3_sitedir} \ | |
133 | CC="%{__cc}" \ | |
134 | CXX="%{__cxx}" \ | |
135 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
136 | CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \ | |
137 | LINK="%{__cxx}" \ | |
138 | LINK_SHLIB="%{__cxx}" | |
139 | ||
140 | %{__make} | |
141 | cd .. | |
142 | %endif | |
183bd075 | 143 | |
144 | %install | |
21ced613 | 145 | rm -rf $RPM_BUILD_ROOT |
21ced613 | 146 | install -d $RPM_BUILD_ROOT%{_sipfilesdir} |
183bd075 | 147 | |
4c693150 JB |
148 | %if %{with python2} |
149 | %{__make} -C build-py2 install \ | |
15e0c203 JB |
150 | DESTDIR=$RPM_BUILD_ROOT |
151 | ||
f2b32c00 JB |
152 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
153 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
4c693150 JB |
154 | %endif |
155 | ||
156 | %if %{with python3} | |
157 | %{__make} -C build-py3 install \ | |
158 | DESTDIR=$RPM_BUILD_ROOT | |
159 | %endif | |
7048cca3 | 160 | |
183bd075 | 161 | %clean |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
164 | %files | |
165 | %defattr(644,root,root,755) | |
7048cca3 JB |
166 | %doc LICENSE NEWS README doc/html |
167 | %attr(755,root,root) %{_bindir}/sip | |
4c693150 | 168 | %dir %{_sipfilesdir} |
7143dd0b | 169 | |
4c693150 | 170 | %if %{with python2} |
9e00b3d2 KK |
171 | %files -n python-sip |
172 | %defattr(644,root,root,755) | |
173 | %attr(755,root,root) %{py_sitedir}/sip.so | |
174 | ||
175 | %files -n python-sip-devel | |
7143dd0b | 176 | %defattr(644,root,root,755) |
f2b32c00 JB |
177 | %{py_sitedir}/sipconfig.py |
178 | %{py_sitedir}/sipconfig.py[co] | |
179 | %{py_sitedir}/sipdistutils.py | |
180 | %{py_sitedir}/sipdistutils.py[co] | |
7048cca3 | 181 | %{py_incdir}/sip.h |
4c693150 JB |
182 | %endif |
183 | ||
184 | %if %{with python3} | |
185 | %files -n python3-sip | |
186 | %defattr(644,root,root,755) | |
187 | %attr(755,root,root) %{py3_sitedir}/sip.so | |
188 | ||
189 | %files -n python3-sip-devel | |
190 | %defattr(644,root,root,755) | |
191 | %{py3_sitedir}/sipconfig.py | |
192 | %{py3_sitedir}/sipdistutils.py | |
193 | %{py3_incdir}/sip.h | |
194 | %endif |