numpy-vl.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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: 8%{?_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. * Wed Aug 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.4.1-8
  120. - add Patch3(changeset_r8510.diff) and Patch4(changeset_r8511.diff) from debian
  121. * Fri Aug 20 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.4.1-7
  122. - Initial build for Vine Linux
  123. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-6
  124. - actually add the patch this time
  125. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-5
  126. - fix segfault within %check on 2.7 (patch 2)
  127. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1:1.4.1-4
  128. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  129. * Sun Jul 18 2010 Dan Horák <dan[at]danny.cz> 1.4.1-3
  130. - ignore the "Ticket #1299 second test" failure on s390(x)
  131. * Thu Jun 24 2010 Jef Spaleta <jspaleta@fedoraprject.org> 1.4.1-2
  132. - source commit fix
  133. * Thu Jun 24 2010 Jef Spaleta <jspaleta@fedoraprject.org> 1.4.1-1
  134. - New upstream release. Include backported doublefree patch
  135. * Mon Apr 26 2010 Jon Ciesla <limb@jcomserv.net> 1.3.0-8
  136. - Moved distutils back to the main package, BZ 572820.
  137. * Thu Apr 08 2010 Jon Ciesla <limb@jcomserv.net> 1.3.0-7
  138. - Reverted to 1.3.0 after upstream pulled 1.4.0, BZ 579065.
  139. * Tue Mar 02 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-5
  140. - Linking /usr/include/numpy to .h files, BZ 185079.
  141. * Tue Feb 16 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-4
  142. - Re-enabling atlas BR, dropping lapack Requires.
  143. * Wed Feb 10 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-3
  144. - Since the previous didn't work, Requiring lapack.
  145. * Tue Feb 09 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-2
  146. - Temporarily dropping atlas BR to work around 562577.
  147. * Fri Jan 22 2010 Jon Ciesla <limb@jcomserv.net> 1.4.0-1
  148. - 1.4.0.
  149. - Dropped ARM patch, ARM support added upstream.
  150. * Tue Nov 17 2009 Jitesh Shah <jiteshs@marvell.com> - 1.3.0-6.fa1
  151. - Add ARM support
  152. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-6
  153. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  154. * Thu Jun 11 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-5
  155. - Fixed atlas BR, BZ 505376.
  156. * Fri Apr 17 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-4
  157. - EVR bump for pygame chainbuild.
  158. * Fri Apr 17 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-3
  159. - Moved linalg, fft back to main package.
  160. * Tue Apr 14 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-2
  161. - Split out f2py into subpackage, thanks Peter Robinson pbrobinson@gmail.com.
  162. * Tue Apr 07 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-1
  163. - Update to latest upstream.
  164. - Fixed Source0 URL.
  165. * Thu Apr 02 2009 Jon Ciesla <limb@jcomserv.net> 1.3.0-0.rc1
  166. - Update to latest upstream.
  167. * Thu Mar 05 2009 Jon Ciesla <limb@jcomserv.net> 1.2.1-3
  168. - Require python-devel, BZ 488464.
  169. * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
  170. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  171. * Fri Dec 19 2008 Jon Ciesla <limb@jcomserv.net> 1.2.1-1
  172. - Update to 1.2.1.
  173. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.2.0-2
  174. - Rebuild for Python 2.6
  175. * Tue Oct 07 2008 Jon Ciesla <limb@jcomserv.net> 1.2.0-1
  176. - New upstream release, added python-nose BR. BZ 465999.
  177. - Using atlas blas, not blas-devel. BZ 461472.
  178. * Wed Aug 06 2008 Jon Ciesla <limb@jcomserv.net> 1.1.1-1
  179. - New upstream release
  180. * Thu May 29 2008 Jarod Wilson <jwilson@redhat.com> 1.1.0-1
  181. - New upstream release
  182. * Tue May 06 2008 Jarod Wilson <jwilson@redhat.com> 1.0.4-1
  183. - New upstream release
  184. * Mon Feb 11 2008 Jarod Wilson <jwilson@redhat.com> 1.0.3.1-2
  185. - Add python egg to %%files on f9+
  186. * Wed Aug 22 2007 Jarod Wilson <jwilson@redhat.com> 1.0.3.1-1
  187. - New upstream release
  188. * Wed Jun 06 2007 Jarod Wilson <jwilson@redhat.com> 1.0.3-1
  189. - New upstream release
  190. * Mon May 14 2007 Jarod Wilson <jwilson@redhat.com> 1.0.2-2
  191. - Drop BR: atlas-devel, since it just provides binary-compat
  192. blas and lapack libs. Atlas can still be optionally used
  193. at runtime. (Note: this is all per the atlas maintainer).
  194. * Mon May 14 2007 Jarod Wilson <jwilson@redhat.com> 1.0.2-1
  195. - New upstream release
  196. * Tue Apr 17 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-4
  197. - Update gfortran patch to recognize latest gfortran f95 support
  198. - Resolves rhbz#236444
  199. * Fri Feb 23 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-3
  200. - Fix up cpuinfo bug (#229753). Upstream bug/change:
  201. http://projects.scipy.org/scipy/scipy/ticket/349
  202. * Thu Jan 04 2007 Jarod Wilson <jwilson@redhat.com> 1.0.1-2
  203. - Per discussion w/Jose Matos, Obsolete/Provide f2py, as the
  204. stand-alone one is no longer supported/maintained upstream
  205. * Wed Dec 13 2006 Jarod Wilson <jwilson@redhat.com> 1.0.1-1
  206. - New upstream release
  207. * Tue Dec 12 2006 Jarod Wilson <jwilson@redhat.com> 1.0-2
  208. - Rebuild for python 2.5
  209. * Wed Oct 25 2006 Jarod Wilson <jwilson@redhat.com> 1.0-1
  210. - New upstream release
  211. * Tue Sep 06 2006 Jarod Wilson <jwilson@redhat.com> 0.9.8-1
  212. - New upstream release
  213. * Wed Apr 26 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.6-1
  214. - Upstream update
  215. * Thu Feb 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.5-1
  216. - Upstream update
  217. * Mon Feb 13 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.4-2
  218. - Rebuild for Fedora Extras 5
  219. * Thu Feb 2 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.9.4-1
  220. - Initial RPM release
  221. - Added gfortran patch from Neal Becker