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