add bootstrap for rebuild python3-3.10
This commit is contained in:
parent
09ac4705e7
commit
28b9458cd7
@ -1,3 +1,6 @@
|
|||||||
|
%global _with_bootstrap 1
|
||||||
|
|
||||||
|
%bcond_with bootstrap
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
|
|
||||||
%global python3_record %{python3_sitelib}/setuptools-%{version}.dist-info/RECORD
|
%global python3_record %{python3_sitelib}/setuptools-%{version}.dist-info/RECORD
|
||||||
@ -7,7 +10,7 @@
|
|||||||
|
|
||||||
Name: python-setuptools
|
Name: python-setuptools
|
||||||
Version: 54.2.0
|
Version: 54.2.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Easily build and distribute Python packages
|
Summary: Easily build and distribute Python packages
|
||||||
|
|
||||||
License: MIT and (BSD or ASL 2.0)
|
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, python3-pytest-fixture-config
|
||||||
BuildRequires: python3-pytest-virtualenv
|
BuildRequires: python3-pytest-virtualenv
|
||||||
%endif
|
%endif
|
||||||
|
%if %{without bootstrap}
|
||||||
BuildRequires: python3-pip, python3-wheel
|
BuildRequires: python3-pip, python3-wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
Provides: python-distribute = %{version}-%{release}, %{name}-wheel
|
Provides: python-distribute = %{version}-%{release}, %{name}-wheel
|
||||||
Obsoletes: python-distribute < 0.6.36-2, %{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
|
chmod -x README.rst
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{without bootstrap}
|
||||||
%py3_build_wheel
|
%py3_build_wheel
|
||||||
|
%else
|
||||||
|
%py3_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without bootstrap}
|
||||||
%py3_install_wheel %{python_whlname}
|
%py3_install_wheel %{python_whlname}
|
||||||
sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record}
|
sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record}
|
||||||
rm -rf %{buildroot}%{python3_sitelib}/{setuptools, pkg_resources}/tests
|
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,_*}
|
rm -r docs/{conf.py,_*}
|
||||||
mkdir -p %{buildroot}%{python_whldir}
|
mkdir -p %{buildroot}%{python_whldir}
|
||||||
install -p dist/%{python_whlname} -t %{buildroot}%{python_whldir}
|
install -p dist/%{python_whlname} -t %{buildroot}%{python_whldir}
|
||||||
|
%else
|
||||||
|
%py3_install
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
@ -79,8 +92,10 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
%if %{without bootstrap}
|
||||||
%dir %{python_whldir}/
|
%dir %{python_whldir}/
|
||||||
%{python_whldir}/%{python_whlname}
|
%{python_whldir}/%{python_whlname}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python3-setuptools
|
%files -n python3-setuptools
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -95,6 +110,9 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 25 2021 shixuantong<shixuantong@huawei.com> - 54.2.0-2
|
||||||
|
- add bootstrap for rebuild python3-3.10
|
||||||
|
|
||||||
* Mon Mar 29 2021 shixuantong<shixuantong@huawei.com> - 54.2.0-1
|
* Mon Mar 29 2021 shixuantong<shixuantong@huawei.com> - 54.2.0-1
|
||||||
- upgrade version to 54.2.0
|
- upgrade version to 54.2.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user