%bcond_without dotests Name: scikit-learn Version: 0.24.2 Release: 1 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 %define python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %global _description %{expand: Scikit-learn is a python module for machine learning built on top of scipy.} BuildRequires: python3-devel >= 3.7.11 BuildRequires: python3-numpy >= 1.21.2 BuildRequires: python3-scipy >= 1.7.1 BuildRequires: python3-Cython >= 0.29.24 %description %{_description} %package -n python3-%{name} Summary: %{summary} Requires: python3 >= 3.7.11 Requires: python3-joblib >= 1.0.1 Requires: python3-threadpoolctl >= 2.2.0 Requires: python3-numpy >= 1.21.2 Requires: python3-scipy >= 1.7.1 Requires: libgomp >= 8.3.0 Requires: libgcc >= 8.3.0 Requires: libstdc++ >= 8.3.0 %description -n python3-%{name} %{_description} %prep %autosetup -n %{name}-%{version} -p1 %build export PATH=/opt/freeware/bin:$PATH ulimit -d unlimited ulimit -m unlimited python3 setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} python3 setup.py install --root %{buildroot} %check %if %{with dotests} python3 -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 -n python3-%{name} %defattr(-,root,system,-) %license COPYING %doc README.rst %{python3_sitearch}/sklearn %{python3_sitearch}/scikit_learn-*.egg-info %changelog * Thu Sep 16 2021 Ayappan P - 0.24.2-1 - First port of scikit-learn to AIX Toolbox