diff --git a/python-threadpoolctl.spec b/python-threadpoolctl.spec new file mode 100644 index 0000000000000000000000000000000000000000..74cdb0ef4af97a7ec1b898a8989bd3fb907437e8 --- /dev/null +++ b/python-threadpoolctl.spec @@ -0,0 +1,58 @@ +%global pypi_name threadpoolctl +%bcond_with test + +Name: python-%{pypi_name} +Version: 1.1.0 +Release: 2 +Summary: Python helpers to limit the number of threads +License: BSD 3-Clause +URL: https://github.com/joblib/threadpoolctl/ +Source0: https://github.com/joblib/threadpoolctl/archive/%{version}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +BuildRequires: python3-devel python3-flit python3-pip + +%if %{with test} +BuildRequires: python3-pytest +%endif + +%global _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. + +%description %{_description} + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %{_description} + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +FLIT_NO_NETWORK=1 FLIT_ROOT_INSTALL=1 flit build --format=wheel + +%install +%py3_install_wheel threadpoolctl-*.whl + +%if %{with test} +%check +py.test-%{python3_version} +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md CHANGES.md +%{python3_sitelib}/threadpoolctl.py +%{python3_sitelib}/%{pypi_name}-*.dist-info/ +%{python3_sitelib}/__pycache__/%{pypi_name}.* + + +%changelog +* Mon Feb 10 2020 Jiangping Hu - 1.1.0-2 +- Init package diff --git a/threadpoolctl-1.1.0.tar.gz b/threadpoolctl-1.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bb70c424056d1d77b15323bb96f46333104989b3 Binary files /dev/null and b/threadpoolctl-1.1.0.tar.gz differ