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