source: projects/specs/trunk/n/numpy/numpy-vl.spec @ 12469

Revision 12469, 11.3 KB checked in by tomop, 4 years ago (diff)

python-3.8.5 and related packages.

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