1 | %bcond_with check |
---|
2 | |
---|
3 | # eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot |
---|
4 | %{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")} |
---|
5 | |
---|
6 | Name: numpy |
---|
7 | Summary: A fast multidimensional array facility for Python |
---|
8 | Version: 1.16.5 |
---|
9 | Release: 1%{?_dist_release} |
---|
10 | Group: Development/Languages |
---|
11 | |
---|
12 | Vendor: Project Vine |
---|
13 | Distribution: Vine Linux |
---|
14 | |
---|
15 | License: BSD and Python and ASL 2.0 |
---|
16 | URL: https://www.numpy.org/ |
---|
17 | Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz |
---|
18 | Source1: https://numpy.org/doc/1.17/numpy-html-1.16.0.zip |
---|
19 | |
---|
20 | Patch0: numpy-1.0.1-f2py.patch |
---|
21 | Patch1: numpy_doublefree.patch |
---|
22 | |
---|
23 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
24 | |
---|
25 | BuildRequires: python-devel |
---|
26 | BuildRequires: python-rpm-macros |
---|
27 | BuildRequires: python-setuptools |
---|
28 | %if %{with check} |
---|
29 | BuildRequires: python-pytest |
---|
30 | %endif |
---|
31 | BuildRequires: Cython |
---|
32 | BuildRequires: gcc-gfortran gcc |
---|
33 | BuildRequires: lapack-devel |
---|
34 | BuildRequires: openblas-devel |
---|
35 | |
---|
36 | Requires: %{name}-common |
---|
37 | |
---|
38 | %description |
---|
39 | NumPy is a general-purpose array-processing package designed to |
---|
40 | efficiently manipulate large multi-dimensional arrays of arbitrary |
---|
41 | records without sacrificing too much speed for small multi-dimensional |
---|
42 | arrays. NumPy is built on the Numeric code base and adds features |
---|
43 | introduced by numarray as well as an extended C-API and the ability to |
---|
44 | create arrays of arbitrary type. |
---|
45 | |
---|
46 | There are also basic facilities for discrete fourier transform, |
---|
47 | basic linear algebra and random number generation. Also included in |
---|
48 | this package is a version of f2py that works properly with NumPy. |
---|
49 | |
---|
50 | |
---|
51 | %package common |
---|
52 | Summary: common files for numpy |
---|
53 | Group: Development/Libraries |
---|
54 | |
---|
55 | %description common |
---|
56 | This package includes header files for numpy. |
---|
57 | |
---|
58 | |
---|
59 | %package -n python-numpy-f2py |
---|
60 | Summary: f2py for numpy |
---|
61 | Group: Development/Libraries |
---|
62 | Requires: %{name} = %{version}-%{release} |
---|
63 | Requires: python-devel |
---|
64 | Provides: python-f2py = %{version}-%{release} |
---|
65 | Provides: numpy-f2py = %{version}-%{release} |
---|
66 | Provides: f2py = %{version}-%{release} |
---|
67 | Obsoletes: f2py <= 2.45.241_1927 |
---|
68 | Obsoletes: numpy-f2py < 1.17.0 |
---|
69 | |
---|
70 | %description -n python-numpy-f2py |
---|
71 | This package includes a version of f2py that works properly with NumPy. |
---|
72 | |
---|
73 | |
---|
74 | %package -n python3-numpy |
---|
75 | Summary: A fast multidimensional array facility for Python |
---|
76 | |
---|
77 | License: BSD |
---|
78 | %{?python_provide:%python_provide python3-numpy} |
---|
79 | Provides: libnpymath-static = %{version}-%{release} |
---|
80 | Provides: libnpymath-static%{?_isa} = %{version}-%{release} |
---|
81 | Requires: %{name}-common = %{version}-%{release} |
---|
82 | |
---|
83 | BuildRequires: python3-devel |
---|
84 | BuildRequires: python3-rpm-macros |
---|
85 | BuildRequires: python3-setuptools |
---|
86 | %if %{with check} |
---|
87 | BuildRequires: python3-pytest |
---|
88 | %endif |
---|
89 | BuildRequires: python3-Cython |
---|
90 | BuildRequires: gcc-gfortran gcc |
---|
91 | BuildRequires: lapack-devel |
---|
92 | BuildRequires: openblas-devel |
---|
93 | |
---|
94 | %description -n python3-numpy |
---|
95 | NumPy is a general-purpose array-processing package designed to |
---|
96 | efficiently manipulate large multi-dimensional arrays of arbitrary |
---|
97 | records without sacrificing too much speed for small multi-dimensional |
---|
98 | arrays. NumPy is built on the Numeric code base and adds features |
---|
99 | introduced by numarray as well as an extended C-API and the ability to |
---|
100 | create arrays of arbitrary type. |
---|
101 | |
---|
102 | There are also basic facilities for discrete fourier transform, |
---|
103 | basic linear algebra and random number generation. Also included in |
---|
104 | this package is a version of f2py that works properly with NumPy. |
---|
105 | |
---|
106 | |
---|
107 | %package -n python3-numpy-f2py |
---|
108 | Summary: f2py for numpy |
---|
109 | Requires: python3-numpy%{?_isa} = %{version}-%{release} |
---|
110 | Requires: python3-devel |
---|
111 | Provides: python3-f2py = %{version}-%{release} |
---|
112 | Obsoletes: python3-f2py <= 2.45.241_1927 |
---|
113 | %{?python_provide:%python_provide python3-numpy-f2py} |
---|
114 | |
---|
115 | %description -n python3-numpy-f2py |
---|
116 | This package includes a version of f2py that works properly with NumPy. |
---|
117 | |
---|
118 | |
---|
119 | %package -n python3-numpy-doc |
---|
120 | Summary: Documentation for numpy |
---|
121 | Requires: python3-numpy = %{version}-%{release} |
---|
122 | BuildArch: noarch |
---|
123 | |
---|
124 | %description -n python3-numpy-doc |
---|
125 | This package provides the complete documentation for NumPy. |
---|
126 | |
---|
127 | |
---|
128 | %prep |
---|
129 | %setup -q -n %{name}-%{version} |
---|
130 | |
---|
131 | # Force re-cythonization (ifed for PKG-INFO presence in setup.py) |
---|
132 | rm -f PKG-INFO |
---|
133 | |
---|
134 | # Use openblas pthreads as recommended by upstream (see comment in site.cfg.example) |
---|
135 | cat >> site.cfg <<EOF |
---|
136 | [openblas] |
---|
137 | libraries = openblasp |
---|
138 | library_dirs = %{_libdir} |
---|
139 | EOF |
---|
140 | |
---|
141 | %build |
---|
142 | |
---|
143 | env OPENBLAS=%{_libdir} \ |
---|
144 | BLAS=%{_libdir} \ |
---|
145 | LAPACK=%{_libdir} CFLAGS="%{optflags}" \ |
---|
146 | %{__python} setup.py build |
---|
147 | |
---|
148 | env OPENBLAS=%{_libdir} \ |
---|
149 | BLAS=%{_libdir} \ |
---|
150 | LAPACK=%{_libdir} CFLAGS="%{optflags}" \ |
---|
151 | %{__python3} setup.py build |
---|
152 | |
---|
153 | %install |
---|
154 | rm -rf %{buildroot} |
---|
155 | |
---|
156 | mkdir docs |
---|
157 | pushd docs |
---|
158 | unzip %{SOURCE1} |
---|
159 | popd |
---|
160 | |
---|
161 | env OPENBLAS=%{_libdir} \ |
---|
162 | FFTW=%{_libdir} BLAS=%{_libdir} \ |
---|
163 | LAPACK=%{_libdir} CFLAGS="%{optflags}" \ |
---|
164 | %{__python} setup.py install --root %{buildroot} |
---|
165 | pushd %{buildroot}%{_bindir} &> /dev/null |
---|
166 | ln -s f2py2 f2py.numpy2 |
---|
167 | popd &> /dev/null |
---|
168 | |
---|
169 | env OPENBLAS=%{_libdir} \ |
---|
170 | FFTW=%{_libdir} BLAS=%{_libdir} \ |
---|
171 | LAPACK=%{_libdir} CFLAGS="%{optflags}" \ |
---|
172 | %{__python3} setup.py install --root %{buildroot} |
---|
173 | pushd %{buildroot}%{_bindir} &> /dev/null |
---|
174 | ln -s f2py3 f2py.numpy |
---|
175 | popd &> /dev/null |
---|
176 | |
---|
177 | #symlink for includes, BZ 185079 |
---|
178 | mkdir -p %{buildroot}%{_includedir} |
---|
179 | #ln -s %{python3_sitearch}/%{name}/core/include/numpy/ %{buildroot}%{_includedir}/numpy |
---|
180 | cp -rf %{buildroot}%{python3_sitearch}/%{name}/core/include/numpy %{buildroot}%{_includedir}/ |
---|
181 | |
---|
182 | # Remove doc files. They should in in %doc |
---|
183 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/COMPATIBILITY |
---|
184 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/DEV_README.txt |
---|
185 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/INSTALL.txt |
---|
186 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/LICENSE.txt |
---|
187 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/README.txt |
---|
188 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/THANKS.txt |
---|
189 | rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/site.cfg.example |
---|
190 | |
---|
191 | %if %{with check} |
---|
192 | %check |
---|
193 | pushd doc &> /dev/null |
---|
194 | PYTHONPATH="%{buildroot}%{python_sitearch}" %{__python} -c "import pkg_resources, numpy ; numpy.test()" \ |
---|
195 | # don't remove this comment |
---|
196 | popd &> /dev/null |
---|
197 | %endif |
---|
198 | |
---|
199 | %clean |
---|
200 | rm -rf $RPM_BUILD_ROOT |
---|
201 | |
---|
202 | %files common |
---|
203 | %{_includedir}/numpy |
---|
204 | |
---|
205 | %files |
---|
206 | %defattr(-,root,root,-) |
---|
207 | %license LICENSE.txt |
---|
208 | %doc THANKS.txt site.cfg.example |
---|
209 | %dir %{python_sitearch}/%{name} |
---|
210 | %{python_sitearch}/%{name}/* |
---|
211 | %exclude %{python_sitearch}/%{name}/f2py |
---|
212 | %{python_sitearch}/%{name}-*.egg-info |
---|
213 | %exclude %{python3_sitearch}/%{name}/LICENSE.txt |
---|
214 | |
---|
215 | %files -n python-numpy-f2py |
---|
216 | %defattr(-,root,root,-) |
---|
217 | %{_bindir}/f2py2* |
---|
218 | %{_bindir}/f2py.numpy2 |
---|
219 | %{python_sitearch}/%{name}/f2py |
---|
220 | |
---|
221 | |
---|
222 | %files -n python3-numpy |
---|
223 | %license LICENSE.txt |
---|
224 | %doc THANKS.txt site.cfg.example |
---|
225 | %dir %{python3_sitearch}/%{name} |
---|
226 | %{python3_sitearch}/%{name}/* |
---|
227 | %exclude %{python3_sitearch}/%{name}/f2py |
---|
228 | %{python3_sitearch}/%{name}-*.egg-info |
---|
229 | %exclude %{python3_sitearch}/%{name}/LICENSE.txt |
---|
230 | |
---|
231 | %files -n python3-numpy-f2py |
---|
232 | %{_bindir}/f2py |
---|
233 | %{_bindir}/f2py3 |
---|
234 | %{_bindir}/f2py.numpy |
---|
235 | %{_bindir}/f2py%{python3_version} |
---|
236 | %{python3_sitearch}/%{name}/f2py |
---|
237 | |
---|
238 | %files -n python3-numpy-doc |
---|
239 | %doc docs/* |
---|
240 | |
---|
241 | |
---|
242 | %changelog |
---|
243 | * Wed Oct 23 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.16.5-1 |
---|
244 | - new upstream release: this version is not newest but final version to suppot python2. |
---|
245 | - added python3 support. |
---|
246 | |
---|
247 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.4.1-9 |
---|
248 | - rebuild with python-2.7.2 |
---|
249 | |
---|
250 | * Wed Aug 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.4.1-8 |
---|
251 | - add Patch3(changeset_r8510.diff) and Patch4(changeset_r8511.diff) from debian |
---|
252 | |
---|
253 | * Fri Aug 20 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.1-7 |
---|
254 | - Initial build for Vine Linux |
---|
255 | |
---|
256 | * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-6 |
---|
257 | - actually add the patch this time |
---|
258 | |
---|
259 | * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-5 |
---|
260 | - fix segfault within %check on 2.7 (patch 2) |
---|
261 | |
---|
262 | * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-4 |
---|
263 | - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
---|
264 | |
---|
265 | * Sun Jul 18 2010 Dan Horák <dan[at]danny.cz> 1.4.1-3 |
---|
266 | - ignore the "Ticket #1299 second test" failure on s390(x) |
---|
267 | |
---|
268 | * Thu Jun 24 2010 Jef Spaleta <jspaleta@fedoraprject.org> 1.4.1-2 |
---|
269 | - source commit fix |
---|
270 | |
---|
271 | * Thu Jun 24 2010 Jef Spaleta <jspaleta@fedoraprject.org> 1.4.1-1 |
---|
272 | - New upstream release. Include backported doublefree patch |
---|
273 | |
---|
274 | * Mon Apr 26 2010 Jon Ciesla <limb@jcomserv.net> 1.3.0-8 |
---|
275 | - Moved distutils back to the main package, BZ 572820. |
---|
276 | |
---|
277 | * Thu Apr 08 2010 Jon Ciesla <limb@jcomserv.net> 1.3.0-7 |
---|
278 | - Reverted to 1.3.0 after upstream pulled 1.4.0, BZ 579065. |
---|
279 | |
---|
280 | * Tue Mar 02 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-5 |
---|
281 | - Linking /usr/include/numpy to .h files, BZ 185079. |
---|
282 | |
---|
283 | * Tue Feb 16 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-4 |
---|
284 | - Re-enabling atlas BR, dropping lapack Requires. |
---|
285 | |
---|
286 | * Wed Feb 10 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-3 |
---|
287 | - Since the previous didn't work, Requiring lapack. |
---|
288 | |
---|
289 | * Tue Feb 09 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-2 |
---|
290 | - Temporarily dropping atlas BR to work around 562577. |
---|
291 | |
---|
292 | * Fri Jan 22 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-1 |
---|
293 | - 1.4.0. |
---|
294 | - Dropped ARM patch, ARM support added upstream. |
---|
295 | |
---|
296 | * Tue Nov 17 2009 Jitesh Shah <jiteshs@marvell.com> - 1.3.0-6.fa1 |
---|
297 | - Add ARM support |
---|
298 | |
---|
299 | * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-6 |
---|
300 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
301 | |
---|
302 | * Thu Jun 11 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-5 |
---|
303 | - Fixed atlas BR, BZ 505376. |
---|
304 | |
---|
305 | * Fri Apr 17 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-4 |
---|
306 | - EVR bump for pygame chainbuild. |
---|
307 | |
---|
308 | * Fri Apr 17 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-3 |
---|
309 | - Moved linalg, fft back to main package. |
---|
310 | |
---|
311 | * Tue Apr 14 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-2 |
---|
312 | - Split out f2py into subpackage, thanks Peter Robinson pbrobinson@gmail.com. |
---|
313 | |
---|
314 | * Tue Apr 07 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-1 |
---|
315 | - Update to latest upstream. |
---|
316 | - Fixed Source0 URL. |
---|
317 | |
---|
318 | * Thu Apr 02 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-0.rc1 |
---|
319 | - Update to latest upstream. |
---|
320 | |
---|
321 | * Thu Mar 05 2009 Jon Ciesla <limb@jcomserv.net> 1.2.1-3 |
---|
322 | - Require python-devel, BZ 488464. |
---|
323 | |
---|
324 | * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2 |
---|
325 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
326 | |
---|
327 | * Fri Dec 19 2008 Jon Ciesla <limb@jcomserv.net> 1.2.1-1 |
---|
328 | - Update to 1.2.1. |
---|
329 | |
---|
330 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.2.0-2 |
---|
331 | - Rebuild for Python 2.6 |
---|
332 | |
---|
333 | * Tue Oct 07 2008 Jon Ciesla <limb@jcomserv.net> 1.2.0-1 |
---|
334 | - New upstream release, added python-nose BR. BZ 465999. |
---|
335 | - Using atlas blas, not blas-devel. BZ 461472. |
---|
336 | |
---|
337 | * Wed Aug 06 2008 Jon Ciesla <limb@jcomserv.net> 1.1.1-1 |
---|
338 | - New upstream release |
---|
339 | |
---|
340 | * Thu May 29 2008 Jarod Wilson <jwilson@redhat.com> 1.1.0-1 |
---|
341 | - New upstream release |
---|
342 | |
---|
343 | * Tue May 06 2008 Jarod Wilson <jwilson@redhat.com> 1.0.4-1 |
---|
344 | - New upstream release |
---|
345 | |
---|
346 | * Mon Feb 11 2008 Jarod Wilson <jwilson@redhat.com> 1.0.3.1-2 |
---|
347 | - Add python egg to %%files on f9+ |
---|
348 | |
---|
349 | * Wed Aug 22 2007 Jarod Wilson <jwilson@redhat.com> 1.0.3.1-1 |
---|
350 | - New upstream release |
---|
351 | |
---|
352 | * Wed Jun 06 2007 Jarod Wilson <jwilson@redhat.com> 1.0.3-1 |
---|
353 | - New upstream release |
---|
354 | |
---|
355 | * Mon May 14 2007 Jarod Wilson <jwilson@redhat.com> 1.0.2-2 |
---|
356 | - Drop BR: atlas-devel, since it just provides binary-compat |
---|
357 | blas and lapack libs. Atlas can still be optionally used |
---|
358 | at runtime. (Note: this is all per the atlas maintainer). |
---|
359 | |
---|
360 | * Mon May 14 2007 Jarod Wilson <jwilson@redhat.com> 1.0.2-1 |
---|
361 | - New upstream release |
---|
362 | |
---|
363 | * Tue Apr 17 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-4 |
---|
364 | - Update gfortran patch to recognize latest gfortran f95 support |
---|
365 | - Resolves rhbz#236444 |
---|
366 | |
---|
367 | * Fri Feb 23 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-3 |
---|
368 | - Fix up cpuinfo bug (#229753). Upstream bug/change: |
---|
369 | http://projects.scipy.org/scipy/scipy/ticket/349 |
---|
370 | |
---|
371 | * Thu Jan 04 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-2 |
---|
372 | - Per discussion w/Jose Matos, Obsolete/Provide f2py, as the |
---|
373 | stand-alone one is no longer supported/maintained upstream |
---|
374 | |
---|
375 | * Wed Dec 13 2006 Jarod Wilson <jwilson@redhat.com> 1.0.1-1 |
---|
376 | - New upstream release |
---|
377 | |
---|
378 | * Tue Dec 12 2006 Jarod Wilson <jwilson@redhat.com> 1.0-2 |
---|
379 | - Rebuild for python 2.5 |
---|
380 | |
---|
381 | * Wed Oct 25 2006 Jarod Wilson <jwilson@redhat.com> 1.0-1 |
---|
382 | - New upstream release |
---|
383 | |
---|
384 | * Wed Sep 06 2006 Jarod Wilson <jwilson@redhat.com> 0.9.8-1 |
---|
385 | - New upstream release |
---|
386 | |
---|
387 | * Wed Apr 26 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.6-1 |
---|
388 | - Upstream update |
---|
389 | |
---|
390 | * Thu Feb 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.5-1 |
---|
391 | - Upstream update |
---|
392 | |
---|
393 | * Mon Feb 13 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.4-2 |
---|
394 | - Rebuild for Fedora Extras 5 |
---|
395 | |
---|
396 | * Thu Feb 2 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.4-1 |
---|
397 | - Initial RPM release |
---|
398 | - Added gfortran patch from Neal Becker |
---|