diff --git a/python-setuptools.spec b/python-setuptools.spec index 8b30cddf0b4b75a319deaae38d16d5c58f589e1a..4d1a7d46c0f6dd8d9f066751c1cb72fdf4cc776a 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,17 +1,13 @@ %bcond_with tests -%bcond_without python2 -%if %{with python2} -%global python2_record %{python2_sitelib}/setuptools-%{version}.dist-info/RECORD -%endif %global python3_record %{python3_sitelib}/setuptools-%{version}.dist-info/RECORD %global python_whldir %{_datadir}/python-wheels -%global python_whlname setuptools-%{version}-py2.py3-none-any.whl +%global python_whlname setuptools-%{version}-py3-none-any.whl Name: python-setuptools Version: 44.1.1 -Release: 1 +Release: 2 Summary: Easily build and distribute Python packages License: MIT and (BSD or ASL 2.0) @@ -21,15 +17,6 @@ Patch0: create-site-packages.patch Patch9000: bugfix-eliminate-random-order-in-metadata.patch BuildArch: noarch -%if %{with python2} -BuildRequires: python2-devel -BuildRequires: python2-pip, python2-wheel -%if %{with tests} -BuildRequires: python2-pip, python2-mock, python2-backports-unittest_mock -BuildRequires: python2-pytest, python2-pytest-fixture-config -BuildRequires: python2-pytest-virtualenv -%endif -%endif BuildRequires: python3-devel %if %{with tests} @@ -49,20 +36,6 @@ have dependencies on other packages. This package contains a python wheel of setuptools to use with venv. -%if %{with python2} -%package -n python2-setuptools -Summary: Easily build and distribute Python packages -%{?python_provide:%python_provide python2-setuptools} - -%description -n python2-setuptools -Setuptools is a collection of enhancements to the Python 2 distutils that allow -you to more easily build and distribute Python 2 packages, especially ones that -have dependencies on other packages. - -This package also contains the runtime components of setuptools, necessary to -execute the software that requires pkg_resources.py. - -%endif %package -n python3-setuptools Summary: Easily build and distribute Python 3 packages @@ -97,22 +70,12 @@ rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record} find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f -%if %{with python2} -%py2_install_wheel %{python_whlname} -rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests -sed -i '/^setuptools\/tests\//d' %{buildroot}%{python2_record} -find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f -%endif - rm -r docs/{Makefile,conf.py,_*} mkdir -p %{buildroot}%{python_whldir} install -p dist/%{python_whlname} -t %{buildroot}%{python_whldir} %if %{with tests} %check -%if %{with python2} -PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python2_version} -%endif PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=setuptools/tests/test_virtualenv.py --ignore=pavement.py %endif @@ -122,14 +85,6 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore= %dir %{python_whldir}/ %{python_whldir}/%{python_whlname} -%if %{with python2} -%files -n python2-setuptools -%defattr(-,root,root) -%{_bindir}/easy_install -%{_bindir}/easy_install-2.* -%{python2_sitelib}/* -%endif - %files -n python3-setuptools %defattr(-,root,root) %{_bindir}/easy_install-3.* @@ -144,6 +99,9 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore= %changelog +* Tue Jan 28 2022 zhaojunfeng - 44.1.1-2 +- remove python2 + * Mon Aug 31 2020 shixuantong - 44.1.1-1 - update version 44.1.1