]>
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} | |
31b998bd | 28 | BuildRequires: python3-devel >= 1:3.5 |
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 | |
31b998bd | 92 | Requires: python3-libs >= 1:3.5 |
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} |
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 | |
85179ece | 155 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/doc |
96d16475 | 156 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/tests |
3f1a239e | 157 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/*/tests |
cc4c8a58 | 158 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/LICENSE.txt |
6c72420e | 159 | |
e2358015 | 160 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c |
15d45a3a JK |
161 | %endif |
162 | ||
163 | %if %{with python3} | |
5a9990bf | 164 | %py3_install |
15d45a3a | 165 | |
15d45a3a | 166 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/doc |
96d16475 | 167 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/tests |
3f1a239e | 168 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*/tests |
cc4c8a58 | 169 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/LICENSE.txt |
15d45a3a JK |
170 | |
171 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c | |
172 | %endif | |
173 | ||
6c72420e JR |
174 | %clean |
175 | rm -rf $RPM_BUILD_ROOT | |
176 | ||
15d45a3a | 177 | %if %{with python2} |
6c72420e | 178 | %files |
6febf52f | 179 | %defattr(644,root,root,755) |
cc4c8a58 | 180 | %doc LICENSE.txt THANKS.txt |
83090946 | 181 | %dir %{py_sitedir}/%{module} |
4d445eeb | 182 | %{py_sitedir}/%{module}/*.py |
83090946 | 183 | %{py_sitedir}/%{module}/*.py[co] |
c2261e45 | 184 | %dir %{py_sitedir}/%{module}/compat |
4d445eeb | 185 | %{py_sitedir}/%{module}/compat/*.py |
c2261e45 | 186 | %{py_sitedir}/%{module}/compat/*.py[co] |
83090946 | 187 | %dir %{py_sitedir}/%{module}/core |
4d445eeb | 188 | %{py_sitedir}/%{module}/core/*.py |
83090946 JB |
189 | %{py_sitedir}/%{module}/core/*.py[co] |
190 | %attr(755,root,root) %{py_sitedir}/%{module}/core/*.so | |
191 | %dir %{py_sitedir}/%{module}/distutils | |
4d445eeb | 192 | %{py_sitedir}/%{module}/distutils/*.py |
83090946 JB |
193 | %{py_sitedir}/%{module}/distutils/*.py[co] |
194 | %dir %{py_sitedir}/%{module}/distutils/command | |
4d445eeb | 195 | %{py_sitedir}/%{module}/distutils/command/*.py |
83090946 JB |
196 | %{py_sitedir}/%{module}/distutils/command/*.py[co] |
197 | %dir %{py_sitedir}/%{module}/distutils/fcompiler | |
4d445eeb | 198 | %{py_sitedir}/%{module}/distutils/fcompiler/*.py |
83090946 | 199 | %{py_sitedir}/%{module}/distutils/fcompiler/*.py[co] |
4dafe483 | 200 | %dir %{py_sitedir}/%{module}/fft |
4d445eeb | 201 | %{py_sitedir}/%{module}/fft/*.py |
4dafe483 | 202 | %{py_sitedir}/%{module}/fft/*.py[co] |
e527b87b | 203 | %attr(755,root,root) %{py_sitedir}/%{module}/fft/fftpack_lite.so |
83090946 | 204 | %dir %{py_sitedir}/%{module}/lib |
4d445eeb | 205 | %{py_sitedir}/%{module}/lib/*.py |
83090946 | 206 | %{py_sitedir}/%{module}/lib/*.py[co] |
83090946 | 207 | %dir %{py_sitedir}/%{module}/linalg |
4d445eeb | 208 | %{py_sitedir}/%{module}/linalg/*.py |
83090946 | 209 | %{py_sitedir}/%{module}/linalg/*.py[co] |
7afea327 | 210 | %attr(755,root,root) %{py_sitedir}/%{module}/linalg/_umath_linalg.so |
e527b87b | 211 | %attr(755,root,root) %{py_sitedir}/%{module}/linalg/lapack_lite.so |
15d45a3a JK |
212 | %dir %{py_sitedir}/%{module}/ma |
213 | %{py_sitedir}/%{module}/ma/*.py | |
214 | %{py_sitedir}/%{module}/ma/*.py[co] | |
c2261e45 | 215 | %dir %{py_sitedir}/%{module}/matrixlib |
4d445eeb | 216 | %{py_sitedir}/%{module}/matrixlib/*.py |
c2261e45 JR |
217 | %{py_sitedir}/%{module}/matrixlib/*.py[co] |
218 | %dir %{py_sitedir}/%{module}/polynomial | |
4d445eeb | 219 | %{py_sitedir}/%{module}/polynomial/*.py |
c2261e45 | 220 | %{py_sitedir}/%{module}/polynomial/*.py[co] |
83090946 | 221 | %dir %{py_sitedir}/%{module}/random |
4d445eeb | 222 | %{py_sitedir}/%{module}/random/*.py |
83090946 | 223 | %{py_sitedir}/%{module}/random/*.py[co] |
e527b87b | 224 | %attr(755,root,root) %{py_sitedir}/%{module}/random/mtrand.so |
83090946 | 225 | %dir %{py_sitedir}/%{module}/testing |
cc4c8a58 | 226 | %{py_sitedir}/%{module}/testing/_private |
4d445eeb | 227 | %{py_sitedir}/%{module}/testing/*.py |
83090946 | 228 | %{py_sitedir}/%{module}/testing/*.py[co] |
e527b87b | 229 | %{py_sitedir}/numpy-%{version}-py*.egg-info |
99afc94d JB |
230 | |
231 | %files devel | |
232 | %defattr(644,root,root,755) | |
233 | %{py_sitedir}/%{module}/core/include | |
234 | %{py_sitedir}/%{module}/core/lib | |
235 | %{py_sitedir}/%{module}/random/*.h | |
236 | ||
99afc94d JB |
237 | %files -n f2py |
238 | %defattr(644,root,root,755) | |
572a26d7 | 239 | %attr(755,root,root) %{_bindir}/f2py2 |
f1db2342 | 240 | %attr(755,root,root) %{_bindir}/f2py%{py_ver} |
99afc94d JB |
241 | %dir %{py_sitedir}/%{module}/f2py |
242 | %{py_sitedir}/%{module}/f2py/*.py | |
243 | %{py_sitedir}/%{module}/f2py/*.py[co] | |
244 | %{py_sitedir}/%{module}/f2py/src | |
15d45a3a | 245 | %endif |
82d8e1e3 | 246 | |
15d45a3a JK |
247 | %if %{with python3} |
248 | %files -n python3-%{module} | |
249 | %defattr(644,root,root,755) | |
cc4c8a58 | 250 | %doc LICENSE.txt THANKS.txt |
15d45a3a JK |
251 | %dir %{py3_sitedir}/%{module} |
252 | %{py3_sitedir}/%{module}/*.py | |
253 | %{py3_sitedir}/%{module}/__pycache__ | |
254 | %dir %{py3_sitedir}/%{module}/compat | |
255 | %{py3_sitedir}/%{module}/compat/*.py | |
256 | %{py3_sitedir}/%{module}/compat/__pycache__ | |
257 | %dir %{py3_sitedir}/%{module}/core | |
258 | %{py3_sitedir}/%{module}/core/*.py | |
259 | %{py3_sitedir}/%{module}/core/__pycache__ | |
260 | %attr(755,root,root) %{py3_sitedir}/%{module}/core/*.cpython-3*.so | |
261 | %dir %{py3_sitedir}/%{module}/distutils | |
262 | %{py3_sitedir}/%{module}/distutils/*.py | |
263 | %{py3_sitedir}/%{module}/distutils/__pycache__ | |
264 | %dir %{py3_sitedir}/%{module}/distutils/command | |
265 | %{py3_sitedir}/%{module}/distutils/command/*.py | |
266 | %{py3_sitedir}/%{module}/distutils/command/__pycache__ | |
267 | %dir %{py3_sitedir}/%{module}/distutils/fcompiler | |
268 | %{py3_sitedir}/%{module}/distutils/fcompiler/*.py | |
269 | %{py3_sitedir}/%{module}/distutils/fcompiler/__pycache__ | |
270 | %dir %{py3_sitedir}/%{module}/fft | |
271 | %{py3_sitedir}/%{module}/fft/*.py | |
272 | %{py3_sitedir}/%{module}/fft/__pycache__ | |
273 | %attr(755,root,root) %{py3_sitedir}/%{module}/fft/fftpack_lite.cpython-3*.so | |
274 | %dir %{py3_sitedir}/%{module}/lib | |
275 | %{py3_sitedir}/%{module}/lib/*.py | |
276 | %{py3_sitedir}/%{module}/lib/__pycache__ | |
15d45a3a JK |
277 | %dir %{py3_sitedir}/%{module}/linalg |
278 | %{py3_sitedir}/%{module}/linalg/*.py | |
279 | %{py3_sitedir}/%{module}/linalg/__pycache__ | |
7afea327 | 280 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/_umath_linalg.cpython-3*.so |
15d45a3a JK |
281 | %attr(755,root,root) %{py3_sitedir}/%{module}/linalg/lapack_lite.cpython-3*.so |
282 | %dir %{py3_sitedir}/%{module}/ma | |
283 | %{py3_sitedir}/%{module}/ma/*.py | |
284 | %{py3_sitedir}/%{module}/ma/__pycache__ | |
285 | %dir %{py3_sitedir}/%{module}/matrixlib | |
286 | %{py3_sitedir}/%{module}/matrixlib/*.py | |
287 | %{py3_sitedir}/%{module}/matrixlib/__pycache__ | |
288 | %dir %{py3_sitedir}/%{module}/polynomial | |
289 | %{py3_sitedir}/%{module}/polynomial/*.py | |
290 | %{py3_sitedir}/%{module}/polynomial/__pycache__ | |
291 | %dir %{py3_sitedir}/%{module}/random | |
292 | %{py3_sitedir}/%{module}/random/*.py | |
293 | %{py3_sitedir}/%{module}/random/__pycache__ | |
294 | %attr(755,root,root) %{py3_sitedir}/%{module}/random/mtrand.cpython-3*.so | |
295 | %dir %{py3_sitedir}/%{module}/testing | |
cc4c8a58 | 296 | %{py3_sitedir}/%{module}/testing/_private |
15d45a3a JK |
297 | %{py3_sitedir}/%{module}/testing/*.py |
298 | %{py3_sitedir}/%{module}/testing/__pycache__ | |
15d45a3a | 299 | %{py3_sitedir}/numpy-%{version}-py*.egg-info |
82d8e1e3 | 300 | |
15d45a3a JK |
301 | %files -n python3-%{module}-devel |
302 | %defattr(644,root,root,755) | |
303 | %{py3_sitedir}/%{module}/core/include | |
304 | %{py3_sitedir}/%{module}/core/lib | |
305 | %{py3_sitedir}/%{module}/random/*.h | |
03367c91 | 306 | |
15d45a3a JK |
307 | %files -n f2py3 |
308 | %defattr(644,root,root,755) | |
309 | %attr(755,root,root) %{_bindir}/f2py3 | |
f1db2342 | 310 | %attr(755,root,root) %{_bindir}/f2py%{py3_ver} |
15d45a3a JK |
311 | %dir %{py3_sitedir}/%{module}/f2py |
312 | %{py3_sitedir}/%{module}/f2py/*.py | |
313 | %{py3_sitedir}/%{module}/f2py/__pycache__ | |
314 | %{py3_sitedir}/%{module}/f2py/src | |
315 | %endif |