# Testcases run till 63%, then stops the rpmbuild as well.So disable by default. %bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global python_major python%{py_major} %global pkgname scipy %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 1.7.1 Release: 2 Summary: Scientific Tools for Python License: BSD URL: http://www.scipy.org/scipylib/index.html Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz %global _description %{expand: Scipy is open-source software for mathematics, science, and engineering. The core library is NumPy which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization. Together, they run on all popular operating systems, are quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers.} BuildRequires: %{python_major}-devel >= %{py_major} BuildRequires: %{python_major}-setuptools >= 65.2.0 BuildRequires: %{python_major}-pybind11 >= 2.7.1 BuildRequires: %{python_major}-numpy >= 1.21.2 BuildRequires: %{python_major}-numpy-f2py >= 1.21.2 BuildRequires: %{python_major}-Cython >= 0.29.24 Requires: %{python_major}-numpy >= 1.21.2 Requires: %{python_major} >= %{py_major}.16 Requires: openblas >= 0.3.18 Requires: libgfortran >= 10.3.0 Requires: libstdc++ >= 10.3.0 Requires: libgcc >= 10.3.0 %description %{_description} %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.16 Requires: %{name} = %{version}-%{release} Requires: python3-numpy >= 1.21.2 %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} -p1 %build export PATH=/opt/freeware/bin:$PATH ulimit -d unlimited ulimit -m unlimited export SCIPY_USE_PYTHRAN=0 %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export SCIPY_USE_PYTHRAN=0 %{python_major} setup.py install --root %{buildroot} %check %if %{with dotests} python3 -m venv --system-site-packages python_venv . ./python_venv/bin/activate pip3 install pytest pip3 install pythran ulimit -d unlimited ulimit -n unlimited ulimit -m unlimited # ulimit -f unlimited ( python runtests.py -m 'full' -v || true ) deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE.txt %doc README.rst %{python3_sitearch}/%{pkgname} %{python3_sitearch}/SciPy-*.egg-info %files -n %{meta_package} %defattr(-,root,system,-) # Empty files %changelog * Wed Mar 01 2023 Ayappan P - 1.7.1-2 - Build using python3.9 * Thu Sep 16 2021 Ayappan P - 1.7.1-1 - First port of scipy to AIX Toolbox