From a514ac25f35953f4a413f66a035006b6143e7101 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Mar 2023 11:57:20 +0000 Subject: [PATCH] import python3.11-numpy-1.23.5-1.el9 --- .gitignore | 1 + .python3.11-numpy.metadata | 1 + SPECS/python3.11-numpy.spec | 195 ++++++++++++++++++++++++++++++++++++ 3 files changed, 197 insertions(+) create mode 100644 .gitignore create mode 100644 .python3.11-numpy.metadata create mode 100644 SPECS/python3.11-numpy.spec 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..5a8247d --- /dev/null +++ b/SPECS/python3.11-numpy.spec @@ -0,0 +1,195 @@ +%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} + +%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 + + +# 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 + + +%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} +%{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ä