diff --git a/python-setuptools.spec b/python-setuptools.spec index b63d4c109659ad7b9890108e42c81aa59d05e7c5..13f10e134283ce54d0b0415aadaa4555541ce2f1 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,9 +1,5 @@ %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 @@ -11,7 +7,7 @@ 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,21 +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 Conflicts: python-setuptools < %{version}-%{release} @@ -97,22 +69,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 +84,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.* @@ -142,7 +96,14 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore= %defattr(-,root,root) %doc docs/* CHANGES.rst README.rst + %changelog +* Mon Nov 2 2020 wangjie -44.1.1-2 +- Type:NA +- ID:NA +- SUG:NA +- DESC:remove python2 + * Wed Sep 2 2020 shixuantong - 44.1.1 - 1 - update version to 44.1.1