commit 10e421010da473cd13e603485533de47f9bda99d Author: CentOS Sources Date: Tue May 16 06:20:34 2023 +0000 import python3.11-numpy-1.23.5-1.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b19dd01 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/numpy-1.23.5.tar.gz diff --git a/.python3.11-numpy.metadata b/.python3.11-numpy.metadata new file mode 100644 index 0000000..06e0f3c --- /dev/null +++ b/.python3.11-numpy.metadata @@ -0,0 +1 @@ +6c7f2278b4ddd113b30821e7e4d5f246dc3ee735 SOURCES/numpy-1.23.5.tar.gz diff --git a/SPECS/python3.11-numpy.spec b/SPECS/python3.11-numpy.spec new file mode 100644 index 0000000..7341723 --- /dev/null +++ b/SPECS/python3.11-numpy.spec @@ -0,0 +1,219 @@ +%global __python3 /usr/bin/python3.11 +%global python3_pkgversion 3.11 + +#uncomment next line for a release candidate or a beta +#%%global relc rc1 + +# RHEL: Tests disabled due to missing dependencies +%bcond_with tests + +%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 +%global blaslib flexiblas +%global blasvar %{nil} +%else +%global blaslib openblas +%global blasvar p +%endif + +%global modname numpy + +Name: python%{python3_pkgversion}-numpy +Version: 1.23.5 +Release: 1%{?dist} +Summary: A fast multidimensional array facility for Python + +# Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python +License: BSD and Python and ASL 2.0 +URL: http://www.numpy.org/ +Source0: https://github.com/%{modname}/%{modname}/releases/download/v%{version}/%{modname}-%{version}.tar.gz + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-rpm-macros +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-Cython +BuildRequires: gcc-gfortran gcc gcc-c++ +BuildRequires: lapack-devel +%if %{with tests} +BuildRequires: python%{python3_pkgversion}-hypothesis +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-test +BuildRequires: python%{python3_pkgversion}-typing-extensions +%endif +BuildRequires: %{blaslib}-devel +BuildRequires: chrpath + +%description +NumPy is a general-purpose array-processing package designed to +efficiently manipulate large multi-dimensional arrays of arbitrary +records without sacrificing too much speed for small multi-dimensional +arrays. NumPy is built on the Numeric code base and adds features +introduced by numarray as well as an extended C-API and the ability to +create arrays of arbitrary type. + +There are also basic facilities for discrete fourier transform, +basic linear algebra and random number generation. Also included in +this package is a version of f2py that works properly with NumPy. + + +%package -n python%{python3_pkgversion}-numpy-f2py +Summary: f2py for numpy +Requires: python%{python3_pkgversion}-numpy%{?_isa} = %{version}-%{release} +Requires: python%{python3_pkgversion}-devel +Provides: python%{python3_pkgversion}-f2py = %{version}-%{release} + +# Require alternatives version that implements the --keep-foreign flag +Requires(postun): alternatives >= 1.19.1-1 +# python3.11 installs the alternatives master symlink to which we attach a slave +Requires: python%{python3_pkgversion} +Requires(post): python%{python3_pkgversion} +Requires(postun): python%{python3_pkgversion} + +%description -n python%{python3_pkgversion}-numpy-f2py +This package includes a version of f2py that works properly with NumPy. + +%prep +%autosetup -n %{modname}-%{version} -p1 + +# Force re-cythonization (ifed for PKG-INFO presence in setup.py) +rm PKG-INFO + +# openblas is provided by flexiblas by default; otherwise, +# Use openblas pthreads as recommended by upstream (see comment in site.cfg.example) +cat >> site.cfg < /dev/null +# Remove unversioned binaries +rm f2py +rm f2py3 +popd &> /dev/null + +# All ghost files controlled by alternatives need to exist for the files +# section check to succeed +touch %{buildroot}%{_bindir}/f2py3 + +# distutils from setuptools don't have the patch that was created to avoid standard runpath here +# we strip it manually instead +# ERROR 0001: file '...' contains a standard runpath '/usr/lib64' in [/usr/lib64] +chrpath --delete %{buildroot}%{python3_sitearch}/%{modname}/core/_multiarray_umath.*.so +chrpath --delete %{buildroot}%{python3_sitearch}/%{modname}/linalg/lapack_lite.*.so +chrpath --delete %{buildroot}%{python3_sitearch}/%{modname}/linalg/_umath_linalg.*.so + +%check +%if %{with tests} +export PYTHONPATH=%{buildroot}%{python3_sitearch} +# test_ppc64_ibm_double_double128 is unnecessary now that ppc64le has switched long doubles to IEEE format. +# https://github.com/numpy/numpy/issues/21094 +%ifarch %{ix86} +# Weird RuntimeWarnings on i686, similar to https://github.com/numpy/numpy/issues/13173 +# Some tests also overflow on 32bit +%global ix86_k and not test_vector_matrix_values and not test_matrix_vector_values and not test_identityless_reduction_huge_array and not (TestKind and test_all) +%endif +%{__python3} runtests.py -v --no-build -- -ra -k 'not test_ppc64_ibm_double_double128 %{?ix86_k}' +%endif + +%post -n python%{python3_pkgversion}-numpy-f2py +alternatives --add-slave python3 %{_bindir}/python%{python3_version} \ + %{_bindir}/f2py3 \ + f2py3 \ + %{_bindir}/f2py%{python3_version} + +%postun -n python%{python3_pkgversion}-numpy-f2py +# Do this only during uninstall process (not during update) +if [ $1 -eq 0 ]; then + alternatives --keep-foreign --remove-slave python3 %{_bindir}/python%{python3_version} \ + f2py3 +fi + + +%files -n python%{python3_pkgversion}-numpy +%license LICENSE.txt +%doc THANKS.txt site.cfg.example +%{python3_sitearch}/%{modname}/__pycache__/ +%dir %{python3_sitearch}/%{modname} +%{python3_sitearch}/%{modname}/*.py* +%{python3_sitearch}/%{modname}/core +%{python3_sitearch}/%{modname}/distutils +%{python3_sitearch}/%{modname}/doc +%{python3_sitearch}/%{modname}/fft +%{python3_sitearch}/%{modname}/lib +%{python3_sitearch}/%{modname}/linalg +%{python3_sitearch}/%{modname}/ma +%{python3_sitearch}/%{modname}/random +%{python3_sitearch}/%{modname}/testing +%{python3_sitearch}/%{modname}/tests +%{python3_sitearch}/%{modname}/compat +%{python3_sitearch}/%{modname}/matrixlib +%{python3_sitearch}/%{modname}/polynomial +%{python3_sitearch}/%{modname}-*.egg-info +%exclude %{python3_sitearch}/%{modname}/LICENSE.txt +%{python3_sitearch}/%{modname}/__init__.pxd +%{python3_sitearch}/%{modname}/__init__.cython-30.pxd +%{python3_sitearch}/%{modname}/py.typed +%{python3_sitearch}/%{modname}/typing/ +%{python3_sitearch}/%{modname}/array_api/ +%{python3_sitearch}/%{modname}/_pyinstaller/ +%{python3_sitearch}/%{modname}/_typing/ + +%files -n python%{python3_pkgversion}-numpy-f2py +%{_bindir}/f2py%{python3_pkgversion} +%ghost %{_bindir}/f2py3 +%{python3_sitearch}/%{modname}/f2py + + +%changelog +* Fri Dec 02 2022 Charalampos Stratakis - 1.23.5-1 +- Initial package +- Fedora contributions by: + Bill Nottingham + Charalampos Stratakis + Christian Dersch + Dan Horák + David Malcolm + David Tardon + Deji Akingunola + Dennis Gilmore + Elliott Sales de Andrade + Gwyn Ciesla + Ignacio Vazquez-Abrams + Iñaki Úcar + Iryna Shcherbina + Jarod Wilson + Jaromir Capik + Jef Spaleta + Jesse Keating + Jon Ciesla + Kalev Lember + Karolina Surma + Lumir Balhar + Merlin Mathesius + Miro Hrončok + Nikola Forró + Orion Poplawski + Pavel Šimovec + Peter Robinson + Robert Kuska + Simone Caronni + Thomas Spura + Tomáš Hrnčiar + Tomas Orsava + Tomas Tomecek + Ville Skyttä