%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global py_minor 13 %global python_major python%{py_major} %global pkgname threadpoolctl %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") %global python3_sitearch64 %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") Name: %{python_major}-%{pkgname} Version: 2.2.0 Release: 2 Summary: Thread-pool Control License: BSD URL: http://github.com/mitsuhiko/markupsafe Source0: %{pkgname}-%{version}.tar.gz BuildArch: noarch Group: Development/Libraries Prefix: %{_prefix} BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} %description Python helpers to limit the number of threads used in the threadpool-backed of common native libraries used for scientific computing and data science (e.g. BLAS and OpenMP). Fine control of the underlying thread-pool size can be useful in workloads that involve nested parallelism so as to mitigate oversubscription issues. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root ${RPM_BUILD_ROOT} %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc LICENSE README.md PKG-INFO %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) %changelog * Wed Feb 15 2023 Ranjit Ranjan - 2.2.0-2 - threadpoolctl build for python3.9 * Thu Sep 16 2021 Ayappan P - 2.2.0-1 - First port of threadpoolctl to AIX Toolbox