!11 Use pyproject to compile package
From: @jxy_git Reviewed-by: @yangzhao_kl Signed-off-by: @yangzhao_kl
This commit is contained in:
commit
2dd3c35d6a
@ -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',
|
|
||||||
+ )
|
|
||||||
@ -3,14 +3,14 @@
|
|||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 3.1.0
|
Version: 3.1.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Python helpers to limit the number of threads
|
Summary: Python helpers to limit the number of threads
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://github.com/joblib/threadpoolctl/
|
URL: https://github.com/joblib/threadpoolctl/
|
||||||
Source0: https://files.pythonhosted.org/packages/1b/c7/3d85f8b3894ba7228d0c74e16e97a36a72b2cd2b0e0f8f89b5d435d11f71/threadpoolctl-3.1.0.tar.gz
|
Source0: https://files.pythonhosted.org/packages/1b/c7/3d85f8b3894ba7228d0c74e16e97a36a72b2cd2b0e0f8f89b5d435d11f71/threadpoolctl-3.1.0.tar.gz
|
||||||
Patch0: 0001-add-setup.py.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-pip python3-wheel python3-flit
|
||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
@ -34,13 +34,16 @@ Summary: %{summary}
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{pypi_name}-%{version} -p1
|
%autosetup -n %{pypi_name}-%{version} -p1
|
||||||
%patch0
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_build
|
||||||
|
|
||||||
%install
|
%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}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
@ -50,11 +53,12 @@ py.test-%{python3_version}
|
|||||||
%files -n python3-%{pypi_name}
|
%files -n python3-%{pypi_name}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md CHANGES.md
|
%doc README.md CHANGES.md
|
||||||
%{python3_sitelib}/threadpoolctl.py
|
%{python3_sitelib}/*
|
||||||
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
|
|
||||||
%{python3_sitelib}/__pycache__/%{pypi_name}.*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 27 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 3.1.0-3
|
||||||
|
- Use pyproject to compile package
|
||||||
|
|
||||||
* Thu Feb 16 2023 tanyulong <tanyulong@kylinos.cn> - 3.1.0-2
|
* Thu Feb 16 2023 tanyulong <tanyulong@kylinos.cn> - 3.1.0-2
|
||||||
- enable check
|
- enable check
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user