numpy-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  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.4.1
  7. Release: 9%{?_dist_release}
  8. Group: Development/Languages
  9. License: BSD
  10. URL: http://numeric.scipy.org/
  11. Source0: http://downloads.sourceforge.net/numpy/%{name}-%{version}.tar.gz
  12. Patch0: numpy-1.0.1-f2py.patch
  13. Patch1: numpy_doublefree.patch
  14. # PyOS_ascii_strtod is deprecated in python 2.7, and the deprecation warning
  15. # outside of the GIL causes python to segfault (rhbz#617384)
  16. # Patch is a combination of upstream changeset 7926 followed by 8387
  17. Patch2: numpy-1.4.1-remove-PyOS_ascii_strtod.patch
  18. ## patches from debian
  19. Patch3: changeset_r8510.diff
  20. Patch4: changeset_r8511.diff
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. #BuildRequires: python-devel lapack-devel python-setuptools gcc-gfortran atlas-devel python-nose
  23. BuildRequires: python-devel lapack-devel python-setuptools gcc-gfortran python-nose
  24. Requires: python-nose
  25. %description
  26. NumPy is a general-purpose array-processing package designed to
  27. efficiently manipulate large multi-dimensional arrays of arbitrary
  28. records without sacrificing too much speed for small multi-dimensional
  29. arrays. NumPy is built on the Numeric code base and adds features
  30. introduced by numarray as well as an extended C-API and the ability to
  31. create arrays of arbitrary type.
  32. There are also basic facilities for discrete fourier transform,
  33. basic linear algebra and random number generation. Also included in
  34. this package is a version of f2py that works properly with NumPy.
  35. %package f2py
  36. Summary: f2py for numpy
  37. Group: Development/Libraries
  38. Requires: %{name} = %{version}-%{release}
  39. Requires: python-devel
  40. Provides: f2py
  41. Obsoletes: f2py <= 2.45.241_1927
  42. %description f2py
  43. This package includes a version of f2py that works properly with NumPy.
  44. %prep
  45. %setup -q -n %{name}-%{version}
  46. %patch0 -p1 -b .f2py
  47. %patch1 -p0
  48. %patch2 -p1 -b .remove-PyOS_ascii_strtod
  49. %patch3 -p1 -b .r8510
  50. %patch4 -p1 -b .r8511
  51. %build
  52. env FFTW=%{_libdir} BLAS=%{_libdir} \
  53. LAPACK=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" \
  54. %{__python} setup.py build --fcompiler=gnu95
  55. %install
  56. rm -rf $RPM_BUILD_ROOT
  57. #%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
  58. # skip-build currently broken, this works around it for now
  59. env ATLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} \
  60. LAPACK=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" \
  61. %{__python} setup.py install --root $RPM_BUILD_ROOT
  62. rm -rf docs-f2py ; mv $RPM_BUILD_ROOT%{python_sitearch}/%{name}/f2py/docs docs-f2py
  63. mv -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/f2py/f2py.1 f2py.1
  64. rm -rf doc ; mv -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/doc .
  65. install -D -p -m 0644 f2py.1 $RPM_BUILD_ROOT%{_mandir}/man1/f2py.1
  66. pushd $RPM_BUILD_ROOT%{_bindir} &> /dev/null
  67. # symlink for anyone who was using f2py.numpy
  68. ln -s f2py f2py.numpy
  69. popd &> /dev/null
  70. #symlink for includes, BZ 185079
  71. mkdir -p $RPM_BUILD_ROOT/usr/include
  72. ln -s %{python_sitearch}/%{name}/core/include/numpy/ $RPM_BUILD_ROOT/usr/include/numpy
  73. # Remove doc files. They should in in %doc
  74. rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/COMPATIBILITY
  75. rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/DEV_README.txt
  76. rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/INSTALL.txt
  77. rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/LICENSE.txt
  78. rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/README.txt
  79. rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/THANKS.txt
  80. rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/site.cfg.example
  81. %check
  82. pushd doc &> /dev/null
  83. PYTHONPATH="%{buildroot}%{python_sitearch}" %{__python} -c "import pkg_resources, numpy ; numpy.test()" \
  84. %ifarch s390 s390x
  85. || :
  86. %endif
  87. # don't remove this comment
  88. popd &> /dev/null
  89. %clean
  90. rm -rf $RPM_BUILD_ROOT
  91. %files
  92. %defattr(-,root,root,-)
  93. %doc docs-f2py doc/* LICENSE.txt README.txt THANKS.txt DEV_README.txt COMPATIBILITY site.cfg.example
  94. %dir %{python_sitearch}/%{name}
  95. %{python_sitearch}/%{name}/*.py*
  96. %{python_sitearch}/%{name}/core
  97. %{python_sitearch}/%{name}/distutils
  98. %{python_sitearch}/%{name}/fft
  99. %{python_sitearch}/%{name}/lib
  100. %{python_sitearch}/%{name}/linalg
  101. %{python_sitearch}/%{name}/ma
  102. %{python_sitearch}/%{name}/numarray
  103. %{python_sitearch}/%{name}/oldnumeric
  104. %{python_sitearch}/%{name}/random
  105. %{python_sitearch}/%{name}/testing
  106. %{python_sitearch}/%{name}/tests
  107. %{python_sitearch}/%{name}/compat
  108. %{python_sitearch}/%{name}/matrixlib
  109. %{python_sitearch}/%{name}/polynomial
  110. %{python_sitearch}/%{name}-*.egg-info
  111. %{_includedir}/numpy
  112. %files f2py
  113. %defattr(-,root,root,-)
  114. %{_mandir}/man*/*
  115. %{_bindir}/f2py
  116. %{_bindir}/f2py.numpy
  117. %{python_sitearch}/%{name}/f2py
  118. %changelog
  119. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.4.1-9
  120. - rebuild with python-2.7.2
  121. * Wed Aug 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.4.1-8
  122. - add Patch3(changeset_r8510.diff) and Patch4(changeset_r8511.diff) from debian
  123. * Fri Aug 20 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.1-7
  124. - Initial build for Vine Linux
  125. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-6
  126. - actually add the patch this time
  127. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-5
  128. - fix segfault within %check on 2.7 (patch 2)
  129. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-4
  130. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  131. * Sun Jul 18 2010 Dan Horák <dan[at]danny.cz> 1.4.1-3
  132. - ignore the "Ticket #1299 second test" failure on s390(x)
  133. * Thu Jun 24 2010 Jef Spaleta <jspaleta@fedoraprject.org> 1.4.1-2
  134. - source commit fix
  135. * Thu Jun 24 2010 Jef Spaleta <jspaleta@fedoraprject.org> 1.4.1-1
  136. - New upstream release. Include backported doublefree patch
  137. * Mon Apr 26 2010 Jon Ciesla <limb@jcomserv.net> 1.3.0-8
  138. - Moved distutils back to the main package, BZ 572820.
  139. * Thu Apr 08 2010 Jon Ciesla <limb@jcomserv.net> 1.3.0-7
  140. - Reverted to 1.3.0 after upstream pulled 1.4.0, BZ 579065.
  141. * Tue Mar 02 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-5
  142. - Linking /usr/include/numpy to .h files, BZ 185079.
  143. * Tue Feb 16 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-4
  144. - Re-enabling atlas BR, dropping lapack Requires.
  145. * Wed Feb 10 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-3
  146. - Since the previous didn't work, Requiring lapack.
  147. * Tue Feb 09 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-2
  148. - Temporarily dropping atlas BR to work around 562577.
  149. * Fri Jan 22 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-1
  150. - 1.4.0.
  151. - Dropped ARM patch, ARM support added upstream.
  152. * Tue Nov 17 2009 Jitesh Shah <jiteshs@marvell.com> - 1.3.0-6.fa1
  153. - Add ARM support
  154. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-6
  155. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  156. * Thu Jun 11 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-5
  157. - Fixed atlas BR, BZ 505376.
  158. * Fri Apr 17 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-4
  159. - EVR bump for pygame chainbuild.
  160. * Fri Apr 17 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-3
  161. - Moved linalg, fft back to main package.
  162. * Tue Apr 14 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-2
  163. - Split out f2py into subpackage, thanks Peter Robinson pbrobinson@gmail.com.
  164. * Tue Apr 07 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-1
  165. - Update to latest upstream.
  166. - Fixed Source0 URL.
  167. * Thu Apr 02 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-0.rc1
  168. - Update to latest upstream.
  169. * Thu Mar 05 2009 Jon Ciesla <limb@jcomserv.net> 1.2.1-3
  170. - Require python-devel, BZ 488464.
  171. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
  172. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  173. * Fri Dec 19 2008 Jon Ciesla <limb@jcomserv.net> 1.2.1-1
  174. - Update to 1.2.1.
  175. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.2.0-2
  176. - Rebuild for Python 2.6
  177. * Tue Oct 07 2008 Jon Ciesla <limb@jcomserv.net> 1.2.0-1
  178. - New upstream release, added python-nose BR. BZ 465999.
  179. - Using atlas blas, not blas-devel. BZ 461472.
  180. * Wed Aug 06 2008 Jon Ciesla <limb@jcomserv.net> 1.1.1-1
  181. - New upstream release
  182. * Thu May 29 2008 Jarod Wilson <jwilson@redhat.com> 1.1.0-1
  183. - New upstream release
  184. * Tue May 06 2008 Jarod Wilson <jwilson@redhat.com> 1.0.4-1
  185. - New upstream release
  186. * Mon Feb 11 2008 Jarod Wilson <jwilson@redhat.com> 1.0.3.1-2
  187. - Add python egg to %%files on f9+
  188. * Wed Aug 22 2007 Jarod Wilson <jwilson@redhat.com> 1.0.3.1-1
  189. - New upstream release
  190. * Wed Jun 06 2007 Jarod Wilson <jwilson@redhat.com> 1.0.3-1
  191. - New upstream release
  192. * Mon May 14 2007 Jarod Wilson <jwilson@redhat.com> 1.0.2-2
  193. - Drop BR: atlas-devel, since it just provides binary-compat
  194. blas and lapack libs. Atlas can still be optionally used
  195. at runtime. (Note: this is all per the atlas maintainer).
  196. * Mon May 14 2007 Jarod Wilson <jwilson@redhat.com> 1.0.2-1
  197. - New upstream release
  198. * Tue Apr 17 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-4
  199. - Update gfortran patch to recognize latest gfortran f95 support
  200. - Resolves rhbz#236444
  201. * Fri Feb 23 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-3
  202. - Fix up cpuinfo bug (#229753). Upstream bug/change:
  203. http://projects.scipy.org/scipy/scipy/ticket/349
  204. * Thu Jan 04 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-2
  205. - Per discussion w/Jose Matos, Obsolete/Provide f2py, as the
  206. stand-alone one is no longer supported/maintained upstream
  207. * Wed Dec 13 2006 Jarod Wilson <jwilson@redhat.com> 1.0.1-1
  208. - New upstream release
  209. * Tue Dec 12 2006 Jarod Wilson <jwilson@redhat.com> 1.0-2
  210. - Rebuild for python 2.5
  211. * Wed Oct 25 2006 Jarod Wilson <jwilson@redhat.com> 1.0-1
  212. - New upstream release
  213. * Tue Sep 06 2006 Jarod Wilson <jwilson@redhat.com> 0.9.8-1
  214. - New upstream release
  215. * Wed Apr 26 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.6-1
  216. - Upstream update
  217. * Thu Feb 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.5-1
  218. - Upstream update
  219. * Mon Feb 13 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.4-2
  220. - Rebuild for Fedora Extras 5
  221. * Thu Feb 2 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.4-1
  222. - Initial RPM release
  223. - Added gfortran patch from Neal Becker