diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch deleted file mode 100644 index 6340fc9de4e3cf7c77d7bbac1dab570791b3c601..0000000000000000000000000000000000000000 --- a/0001-add-setup.py.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- c/setup.py 1970-01-01 08:00:00.000000000 +0800 -+++ a/setup.py 2022-10-28 14:58:41.729391467 +0800 -@@ -0,0 +1,15 @@ -+#!/usr/bin/env python -+# setup.py generated by flit for tools that don't yet use PEP 517 -+ -+from distutils.core import setup -+ -+ -+setup(name='threadpoolctl', -+ version='3.1.0', -+ description='threadpoolctl', -+ author='Thomas Moreau', -+ author_email='thomas.moreau.2010@gmail.com', -+ url='https://github.com/joblib/threadpoolctl', -+ py_modules=['threadpoolctl'], -+ python_requires='>=3.6', -+ ) diff --git a/python-threadpoolctl.spec b/python-threadpoolctl.spec index d33a1a642493a6c7146420d2aed6e20128a275df..2d59832157a1a18c4354ae5eb416bba6716a6a07 100644 --- a/python-threadpoolctl.spec +++ b/python-threadpoolctl.spec @@ -3,14 +3,14 @@ Name: python-%{pypi_name} Version: 3.1.0 -Release: 2 +Release: 3 Summary: Python helpers to limit the number of threads License: BSD-3-Clause URL: https://github.com/joblib/threadpoolctl/ Source0: https://files.pythonhosted.org/packages/1b/c7/3d85f8b3894ba7228d0c74e16e97a36a72b2cd2b0e0f8f89b5d435d11f71/threadpoolctl-3.1.0.tar.gz -Patch0: 0001-add-setup.py.patch BuildArch: noarch BuildRequires: python3-devel +BuildRequires: python3-pip python3-wheel python3-flit %if %{with test} BuildRequires: python3-pytest @@ -34,13 +34,16 @@ Summary: %{summary} %prep %autosetup -n %{pypi_name}-%{version} -p1 -%patch0 %build -%py3_build +%pyproject_build %install -%py3_install +%pyproject_install threadpoolctl==%{version} +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi %if %{with test} %check @@ -50,11 +53,12 @@ py.test-%{python3_version} %files -n python3-%{pypi_name} %license LICENSE %doc README.md CHANGES.md -%{python3_sitelib}/threadpoolctl.py -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info -%{python3_sitelib}/__pycache__/%{pypi_name}.* +%{python3_sitelib}/* %changelog +* Thu Apr 27 2023 jiangxinyu - 3.1.0-3 +- Use pyproject to compile package + * Thu Feb 16 2023 tanyulong - 3.1.0-2 - enable check