]>
Commit | Line | Data |
---|---|---|
e8410fc9 | 1 | # |
15d45a3a | 2 | # Conditional build: |
e8410fc9 JB |
3 | %bcond_without python2 # CPython 2.x modules |
4 | %bcond_without python3 # CPython 3.x modules | |
15d45a3a | 5 | |
87f01f56 | 6 | %define module numpy |
e8410fc9 JB |
7 | Summary: Python 2 numerical facilities |
8 | Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 2 | |
82d8e1e3 | 9 | Name: python-%{module} |
7cd5c7c6 | 10 | Version: 1.11.1 |
572a26d7 | 11 | Release: 1 |
83090946 | 12 | Epoch: 1 |
31aec831 | 13 | License: BSD |
afceca96 | 14 | Group: Libraries/Python |
e527b87b | 15 | Source0: http://downloads.sourceforge.net/numpy/%{module}-%{version}.tar.gz |
7cd5c7c6 | 16 | # Source0-md5: 2f44a895a8104ffac140c3a70edbd450 |
065b9267 | 17 | Patch0: %{name}-fortran-version.patch |
abd2761d | 18 | URL: http://sourceforge.net/projects/numpy/ |
413816ec JB |
19 | BuildRequires: gcc-fortran |
20 | BuildRequires: lapack-devel >= 3.1.1-2 | |
15d45a3a | 21 | %if %{with python2} |
1bb69c27 | 22 | BuildRequires: python-devel >= 1:2.6 |
413816ec | 23 | BuildRequires: python-setuptools |
15d45a3a JK |
24 | %endif |
25 | %if %{with python3} | |
15d45a3a | 26 | BuildRequires: python3-2to3 |
413816ec JB |
27 | BuildRequires: python3-devel >= 1:3.3 |
28 | BuildRequires: python3-setuptools | |
15d45a3a | 29 | %endif |
15d45a3a | 30 | BuildRequires: rpm-pythonprov |
413816ec JB |
31 | BuildRequires: rpmbuild(macros) >= 1.714 |
32 | Requires: python-libs >= 1:2.6 | |
83090946 JB |
33 | # -- dropped some time ago |
34 | Obsoletes: python-numpy-Properties | |
35 | # -- dropped some time ago, should have been released as separate package, but wasn't | |
36 | Obsoletes: python-numpy-kinds | |
4dafe483 JB |
37 | # old subpackage, merged into main |
38 | Obsoletes: python-numpy-FFT | |
e527b87b | 39 | # -- dropped during Numeric->numpy transition (ma in main now?) |
83090946 JB |
40 | Obsoletes: python-numpy-MA |
41 | Obsoletes: python-numpy-RNG | |
cd9c05a8 JR |
42 | Obsoletes: python-Numeric |
43 | Obsoletes: python-Numeric-FFT | |
44 | Obsoletes: python-Numeric-MA | |
45 | Obsoletes: python-Numeric-RNG | |
fed64725 | 46 | Requires: pydoc |
87f01f56 | 47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
6c72420e JR |
48 | |
49 | %description | |
50 | NumPy is a collection of extension modules to provide high-performance | |
51 | multidimensional numeric arrays to the Python programming language. | |
52 | ||
e8410fc9 JB |
53 | This package contains Python 2 modules. |
54 | ||
7511f32d | 55 | %description -l pl.UTF-8 |
e8410fc9 JB |
56 | NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia |
57 | numeryczne na macierzach wielowymiarowych w języku Python. | |
58 | ||
59 | Ten pakiet zawiera moduły Pythona 2. | |
6a1c76a9 | 60 | |
82d8e1e3 | 61 | %package devel |
e8410fc9 JB |
62 | Summary: C header files for Python 2 numerical modules |
63 | Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 2 | |
d3c60c72 | 64 | Group: Development/Languages/Python |
c8e56905 | 65 | %pyrequires_eq python-devel |
83090946 | 66 | Requires: %{name} = %{epoch}:%{version}-%{release} |
e8410fc9 | 67 | Obsoletes: python-Numeric-devel |
82d8e1e3 | 68 | |
69 | %description devel | |
e8410fc9 | 70 | C header files for Python 2 numerical modules. |
6a1c76a9 | 71 | |
7511f32d | 72 | %description devel -l pl.UTF-8 |
e8410fc9 | 73 | Pliki nagłówkowe języka C modułów numerycznych Pythona 2. |
82d8e1e3 | 74 | |
99afc94d JB |
75 | %package -n f2py |
76 | Summary: Fortran to Python 2 interface generator | |
77 | Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 2 | |
78 | Group: Libraries/Python | |
79 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
80 | ||
81 | %description -n f2py | |
82 | Fortran to Python 2 interface generator. | |
83 | ||
84 | %description -n f2py -l pl.UTF-8 | |
85 | Generator interfejsów z Fortranu do Pythona 2. | |
86 | ||
87 | %package -n python3-%{module} | |
88 | Summary: Python 3.x numerical facilities | |
89 | Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 3.x | |
90 | Group: Libraries/Python | |
413816ec | 91 | Requires: python3-libs >= 1:3.3 |
99afc94d JB |
92 | |
93 | %description -n python3-%{module} | |
94 | NumPy is a collection of extension modules to provide high-performance | |
95 | multidimensional numeric arrays to the Python programming language. | |
96 | ||
97 | This package contains Python 3 modules. | |
98 | ||
99 | %description -l pl.UTF-8 -n python3-%{module} | |
100 | NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia | |
101 | numeryczne na macierzach wielowymiarowych w języku Python. | |
102 | ||
103 | Ten pakiet zawiera moduły Pythona 3. | |
104 | ||
105 | %package -n python3-%{module}-devel | |
106 | Summary: C header files for Python 3 numerical modules | |
107 | Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 3 | |
108 | Group: Development/Languages/Python | |
413816ec | 109 | %pyrequires_eq python3-devel |
99afc94d JB |
110 | Requires: python3-%{module} = %{epoch}:%{version}-%{release} |
111 | Obsoletes: python-Numeric-devel | |
112 | ||
113 | %description -n python3-%{module}-devel | |
114 | C header files for Python 3 numerical modules. | |
115 | ||
116 | %description -n python3-%{module}-devel -l pl.UTF-8 | |
117 | Pliki nagłówkowe języka C modułów numerycznych Pythona 3. | |
118 | ||
15d45a3a JK |
119 | %package -n f2py3 |
120 | Summary: Fortran to Python 3 interface generator | |
121 | Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 3 | |
122 | Group: Libraries/Python | |
e8410fc9 | 123 | Requires: python3-%{module} = %{epoch}:%{version}-%{release} |
15d45a3a JK |
124 | |
125 | %description -n f2py3 | |
126 | Fortran to Python 3 interface generator. | |
127 | ||
128 | %description -n f2py3 -l pl.UTF-8 | |
129 | Generator interfejsów z Fortranu do Pythona 3. | |
130 | ||
6c72420e | 131 | %prep |
b254458b | 132 | %setup -q -n %{module}-%{version} |
065b9267 | 133 | %patch0 -p1 |
6c72420e JR |
134 | |
135 | %build | |
572a26d7 JB |
136 | # numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements, |
137 | # instead of appending proper options (like -fPIC/-shared resp.) | |
138 | CFLAGS="%{rpmcflags} -fPIC" | |
139 | LDFLAGS="%{rpmldflags} -shared" | |
15d45a3a JK |
140 | |
141 | %if %{with python2} | |
5a9990bf | 142 | %py_build |
15d45a3a JK |
143 | %endif |
144 | ||
145 | %if %{with python3} | |
5a9990bf | 146 | %py3_build |
15d45a3a | 147 | %endif |
6c72420e JR |
148 | |
149 | %install | |
d1d6da54 | 150 | rm -rf $RPM_BUILD_ROOT |
6ca3085b | 151 | |
15d45a3a | 152 | %if %{with python2} |
5a9990bf | 153 | %py_install |
6ca3085b | 154 | |
6a274b9f | 155 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
156 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
83090946 | 157 | |
85179ece | 158 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/doc |
3f1a239e | 159 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/*/tests |
6c72420e | 160 | |
e2358015 | 161 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c |
15d45a3a JK |
162 | %endif |
163 | ||
164 | %if %{with python3} | |
5a9990bf | 165 | %py3_install |
15d45a3a JK |
166 | |
167 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
168 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
169 | ||
170 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/doc | |
3f1a239e | 171 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*/tests |
15d45a3a JK |
172 | |
173 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c | |
174 | %endif | |
175 | ||
6c72420e JR |
176 | %clean |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | ||
15d45a3a | 179 | %if %{with python2} |
6c72420e | 180 | %files |
6febf52f | 181 | %defattr(644,root,root,755) |
83090946 | 182 | %dir %{py_sitedir}/%{module} |
4d445eeb | 183 | %{py_sitedir}/%{module}/*.py |
83090946 | 184 | %{py_sitedir}/%{module}/*.py[co] |
c2261e45 | 185 | %dir %{py_sitedir}/%{module}/compat |
4d445eeb | 186 | %{py_sitedir}/%{module}/compat/*.py |
c2261e45 | 187 | %{py_sitedir}/%{module}/compat/*.py[co] |
83090946 | 188 | %dir %{py_sitedir}/%{module}/core |
4d445eeb | 189 | %{py_sitedir}/%{module}/core/*.py |
83090946 JB |
190 | %{py_sitedir}/%{module}/core/*.py[co] |
191 | %attr(755,root,root) %{py_sitedir}/%{module}/core/*.so | |
192 | %dir %{py_sitedir}/%{module}/distutils | |
4d445eeb | 193 | %{py_sitedir}/%{module}/distutils/*.py |
83090946 JB |
194 | %{py_sitedir}/%{module}/distutils/*.py[co] |
195 | %dir %{py_sitedir}/%{module}/distutils/command | |
4d445eeb | 196 | %{py_sitedir}/%{module}/distutils/command/*.py |
83090946 JB |
197 | %{py_sitedir}/%{module}/distutils/command/*.py[co] |
198 | %dir %{py_sitedir}/%{module}/distutils/fcompiler | |
4d445eeb | 199 | %{py_sitedir}/%{module}/distutils/fcompiler/*.py |
83090946 | 200 | %{py_sitedir}/%{module}/distutils/fcompiler/*.py[co] |
4dafe483 | 201 | %dir %{py_sitedir}/%{module}/fft |
4d445eeb | 202 | %{py_sitedir}/%{module}/fft/*.py |
4dafe483 | 203 | %{py_sitedir}/%{module}/fft/*.py[co] |
e527b87b | 204 | %attr(755,root,root) %{py_sitedir}/%{module}/fft/fftpack_lite.so |
83090946 | 205 | %dir %{py_sitedir}/%{module}/lib |
4d445eeb | 206 | %{py_sitedir}/%{module}/lib/*.py |
83090946 | 207 | %{py_sitedir}/%{module}/lib/*.py[co] |
83090946 | 208 | %dir %{py_sitedir}/%{module}/linalg |
4d445eeb | 209 | %{py_sitedir}/%{module}/linalg/*.py |
83090946 | 210 | %{py_sitedir}/%{module}/linalg/*.py[co] |
7afea327 | 211 | %attr(755,root,root) %{py_sitedir}/%{module}/linalg/_umath_linalg.so |
e527b87b | 212 | %attr(755,root,root) %{py_sitedir}/%{module}/linalg/lapack_lite.so |
15d45a3a JK |
213 | %dir %{py_sitedir}/%{module}/ma |
214 | %{py_sitedir}/%{module}/ma/*.py | |
215 | %{py_sitedir}/%{module}/ma/*.py[co] | |
c2261e45 | 216 | %dir %{py_sitedir}/%{module}/matrixlib |
4d445eeb | 217 | %{py_sitedir}/%{module}/matrixlib/*.py |
c2261e45 JR |
218 | %{py_sitedir}/%{module}/matrixlib/*.py[co] |
219 | %dir %{py_sitedir}/%{module}/polynomial | |
4d445eeb | 220 | %{py_sitedir}/%{module}/polynomial/*.py |
c2261e45 | 221 | %{py_sitedir}/%{module}/polynomial/*.py[co] |
83090946 | 222 | %dir %{py_sitedir}/%{module}/random |
4d445eeb | 223 | %{py_sitedir}/%{module}/random/*.py |
83090946 | 224 | %{py_sitedir}/%{module}/random/*.py[co] |
e527b87b | 225 | %attr(755,root,root) %{py_sitedir}/%{module}/random/mtrand.so |
83090946 | 226 | %dir %{py_sitedir}/%{module}/testing |
4d445eeb | 227 | %{py_sitedir}/%{module}/testing/*.py |
83090946 | 228 | %{py_sitedir}/%{module}/testing/*.py[co] |
e527b87b | 229 | %dir %{py_sitedir}/%{module}/tests |
4d445eeb | 230 | %{py_sitedir}/%{module}/tests/*.py |
e527b87b | 231 | %{py_sitedir}/%{module}/tests/*.py[co] |
e527b87b | 232 | %{py_sitedir}/numpy-%{version}-py*.egg-info |
99afc94d JB |
233 | |
234 | %files devel | |
235 | %defattr(644,root,root,755) | |
236 | %{py_sitedir}/%{module}/core/include | |
237 | %{py_sitedir}/%{module}/core/lib | |
238 | %{py_sitedir}/%{module}/random/*.h | |
239 | ||
99afc94d JB |
240 | %files -n f2py |
241 | %defattr(644,root,root,755) | |
572a26d7 | 242 | %attr(755,root,root) %{_bindir}/f2py2 |
99afc94d JB |
243 | %dir %{py_sitedir}/%{module}/f2py |
244 | %{py_sitedir}/%{module}/f2py/*.py | |
245 | %{py_sitedir}/%{module}/f2py/*.py[co] | |
246 | %{py_sitedir}/%{module}/f2py/src | |
15d45a3a | 247 | %endif |
82d8e1e3 | 248 | |
15d45a3a JK |
249 | %if %{with python3} |
250 | %files -n python3-%{module} | |
251 | %defattr(644,root,root,755) | |
252 | %dir %{py3_sitedir}/%{module} | |
253 | %{py3_sitedir}/%{module}/*.py | |
254 | %{py3_sitedir}/%{module}/__pycache__ | |
255 | %dir %{py3_sitedir}/%{module}/compat | |
256 | %{py3_sitedir}/%{module}/compat/*.py | |
257 | %{py3_sitedir}/%{module}/compat/__pycache__ | |
258 | %dir %{py3_sitedir}/%{module}/core | |
259 | %{py3_sitedir}/%{module}/core/*.py | |
260 | %{py3_sitedir}/%{module}/core/__pycache__ | |
261 | %attr(755,root,root) %{py3_sitedir}/%{module}/core/*.cpython-3*.so | |
262 | %dir %{py3_sitedir}/%{module}/distutils | |
263 | %{py3_sitedir}/%{module}/distutils/*.py | |
264 | %{py3_sitedir}/%{module}/distutils/__pycache__ | |
265 | %dir %{py3_sitedir}/%{module}/distutils/command | |
266 | %{py3_sitedir}/%{module}/distutils/command/*.py | |
267 | %{py3_sitedir}/%{module}/distutils/command/__pycache__ | |
268 | %dir %{py3_sitedir}/%{module}/distutils/fcompiler | |
269 | %{py3_sitedir}/%{module}/distutils/fcompiler/*.py | |
270 | %{py3_sitedir}/%{module}/distutils/fcompiler/__pycache__ | |
271 | %dir %{py3_sitedir}/%{module}/fft | |
272 | %{py3_sitedir}/%{module}/fft/*.py | |
273 | %{py3_sitedir}/%{module}/fft/__pycache__ | |
274 | %attr(755,root,root) %{py3_sitedir}/%{module}/fft/fftpack_lite.cpython-3*.so | |
275 | %dir %{py3_sitedir}/%{module}/lib | |
276 | %{py3_sitedir}/%{module}/lib/*.py | |
277 | %{py3_sitedir}/%{module}/lib/__pycache__ | |
15d45a3a JK |
278 | %dir %{py3_sitedir}/%{module}/linalg |
279 | %{py3_sitedir}/%{module}/linalg/*.py | |
280 | %{py3_sitedir}/%{module}/linalg/__pycache__ | |
7afea327 | 281 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/_umath_linalg.cpython-3*.so |
15d45a3a JK |
282 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/lapack_lite.cpython-3*.so |
283 | %dir %{py3_sitedir}/%{module}/ma | |
284 | %{py3_sitedir}/%{module}/ma/*.py | |
285 | %{py3_sitedir}/%{module}/ma/__pycache__ | |
286 | %dir %{py3_sitedir}/%{module}/matrixlib | |
287 | %{py3_sitedir}/%{module}/matrixlib/*.py | |
288 | %{py3_sitedir}/%{module}/matrixlib/__pycache__ | |
289 | %dir %{py3_sitedir}/%{module}/polynomial | |
290 | %{py3_sitedir}/%{module}/polynomial/*.py | |
291 | %{py3_sitedir}/%{module}/polynomial/__pycache__ | |
292 | %dir %{py3_sitedir}/%{module}/random | |
293 | %{py3_sitedir}/%{module}/random/*.py | |
294 | %{py3_sitedir}/%{module}/random/__pycache__ | |
295 | %attr(755,root,root) %{py3_sitedir}/%{module}/random/mtrand.cpython-3*.so | |
296 | %dir %{py3_sitedir}/%{module}/testing | |
297 | %{py3_sitedir}/%{module}/testing/*.py | |
298 | %{py3_sitedir}/%{module}/testing/__pycache__ | |
299 | %dir %{py3_sitedir}/%{module}/tests | |
300 | %{py3_sitedir}/%{module}/tests/*.py | |
301 | %{py3_sitedir}/%{module}/tests/__pycache__ | |
302 | %{py3_sitedir}/numpy-%{version}-py*.egg-info | |
82d8e1e3 | 303 | |
15d45a3a JK |
304 | %files -n python3-%{module}-devel |
305 | %defattr(644,root,root,755) | |
306 | %{py3_sitedir}/%{module}/core/include | |
307 | %{py3_sitedir}/%{module}/core/lib | |
308 | %{py3_sitedir}/%{module}/random/*.h | |
03367c91 | 309 | |
15d45a3a JK |
310 | %files -n f2py3 |
311 | %defattr(644,root,root,755) | |
312 | %attr(755,root,root) %{_bindir}/f2py3 | |
313 | %dir %{py3_sitedir}/%{module}/f2py | |
314 | %{py3_sitedir}/%{module}/f2py/*.py | |
315 | %{py3_sitedir}/%{module}/f2py/__pycache__ | |
316 | %{py3_sitedir}/%{module}/f2py/src | |
317 | %endif |