%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global python_major python%{py_major} %global pkgname scikit-learn %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: 0.24.2 Release: 2 Summary: Python modules for machine learning and data mining License: BSD URL: https://scikit-learn.org/ Source0: https://files.pythonhosted.org/packages/source/s/scikit-learn/scikit-learn-%{version}.tar.gz %global _description %{expand: Scikit-learn is a python module for machine learning built on top of scipy.} BuildRequires: %{python_major}-devel >= %{py_major} BuildRequires: %{python_major}-setuptools >= 65.2.0 BuildRequires: %{python_major}-numpy >= 1.21.2 BuildRequires: %{python_major}-scipy >= 1.7.1 BuildRequires: %{python_major}-Cython >= 0.29.24 Requires: %{python_major} >= %{py_major}.16 Requires: %{python_major}-numpy >= 1.21.2 Requires: %{python_major}-scipy >= 1.7.1 Requires: %{python_major}-joblib >= 1.0.1 Requires: %{python_major}-threadpoolctl >= 2.2.0 Requires: libgomp >= 10.3.0 Requires: libgcc >= 10.3.0 Requires: libstdc++ >= 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-joblib >= 1.0.1 Requires: python3-threadpoolctl >= 2.2.0 Requires: python3-numpy >= 1.21.2 Requires: python3-scipy >= 1.7.1 %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 %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} %check %if %{with dotests} python3.9 -m venv --system-site-packages python_venv . ./python_venv/bin/activate pip3 install pytest ulimit -d unlimited ulimit -m unlimited ( pytest %{buildroot}%{python3_sitearch}/sklearn || true ) deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license COPYING %doc README.rst %{python3_sitearch}/sklearn %{python3_sitearch}/scikit_learn-*.egg-info %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Fri Mar 03 2023 Ayappan P - 0.24.2-2 - Build using python3.9 * Thu Sep 16 2021 Ayappan P - 0.24.2-1 - First port of scikit-learn to AIX Toolbox