numpy-vl.spec 12 KB

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