From 28b9458cd7065e764afce7ae3bab9ec7eb0e7a7d Mon Sep 17 00:00:00 2001 From: shixuantong Date: Thu, 25 Nov 2021 16:12:02 +0800 Subject: [PATCH] add bootstrap for rebuild python3-3.10 --- python-setuptools.spec | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/python-setuptools.spec b/python-setuptools.spec index 1ffafc2..fed0420 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,3 +1,6 @@ +%global _with_bootstrap 1 + +%bcond_with bootstrap %bcond_with tests %global python3_record %{python3_sitelib}/setuptools-%{version}.dist-info/RECORD @@ -7,7 +10,7 @@ Name: python-setuptools Version: 54.2.0 -Release: 1 +Release: 2 Summary: Easily build and distribute Python packages License: MIT and (BSD or ASL 2.0) @@ -23,7 +26,9 @@ BuildRequires: python3-pip, python3-mock BuildRequires: python3-pytest, python3-pytest-fixture-config BuildRequires: python3-pytest-virtualenv %endif +%if %{without bootstrap} BuildRequires: python3-pip, python3-wheel +%endif Provides: python-distribute = %{version}-%{release}, %{name}-wheel Obsoletes: python-distribute < 0.6.36-2, %{name}-wheel @@ -58,9 +63,14 @@ rm setuptools/tests/test_integration.py chmod -x README.rst %build +%if %{without bootstrap} %py3_build_wheel +%else +%py3_build +%endif %install +%if %{without bootstrap} %py3_install_wheel %{python_whlname} sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record} rm -rf %{buildroot}%{python3_sitelib}/{setuptools, pkg_resources}/tests @@ -70,6 +80,9 @@ find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f rm -r docs/{conf.py,_*} mkdir -p %{buildroot}%{python_whldir} install -p dist/%{python_whlname} -t %{buildroot}%{python_whldir} +%else +%py3_install +%endif %if %{with tests} %check @@ -79,8 +92,10 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore= %files %defattr(-,root,root) %license LICENSE +%if %{without bootstrap} %dir %{python_whldir}/ %{python_whldir}/%{python_whlname} +%endif %files -n python3-setuptools %defattr(-,root,root) @@ -95,6 +110,9 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore= %changelog +* Thu Nov 25 2021 shixuantong - 54.2.0-2 +- add bootstrap for rebuild python3-3.10 + * Mon Mar 29 2021 shixuantong - 54.2.0-1 - upgrade version to 54.2.0 -- Gitee