numpy-vl.spec 13 KB

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