Subpackage python2-pysocks has been removed

This commit is contained in:
Miro Hrončok 2019-11-25 00:43:43 +01:00
parent 289b59abe5
commit 5c9dac104b

View File

@ -1,30 +1,14 @@
%if 0%{?rhel}
%global with_python2 1
%endif
%if 0%{?fedora}
# FIXME maybe Fedora 31+ without python2 subpackage
# https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
# when needed, uncomment build conditional and later drop this block entirely
#%%if 0%%{?fedora} <= 31
%global with_python2 1
#%%endif
%endif
%if 0%{?rhel} >= 7
%global with_python3 1
%endif
%if 0%{?fedora}
%global with_python3 1
%global with_python3_tests 1
%endif
%global pypi_name PySocks
%global modname pysocks
%global sum A Python SOCKS client module
Name: python-%{modname}
Version: 1.7.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: %{sum}
License: BSD
@ -46,28 +30,7 @@ Acts as a drop-in replacement to the socket module. Featuring:\
%description
%_description
%if 0%{?with_python2}
%package -n python2-%{modname}
Summary: %{sum}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%{?python_provide:%python_provide python2-%{modname}}
# SocksiPy is retired in F30, drop when Fedora 29 becomes EOL
# https://bugzilla.redhat.com/show_bug.cgi?id=1334407
%if 0%{?fedora} && 0%{?fedora} < 30
Obsoletes: python-SocksiPy
Obsoletes: python2-SocksiPy
Provides: python-SocksiPy
Provides: python2-SocksiPy
%endif
%description -n python2-%{modname}
%_description
This package is for Python2 only.
%endif
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-%{modname}
Summary: %{sum}
BuildRequires: python%{python3_pkgversion}-devel
@ -87,7 +50,6 @@ Conflicts: python%{python3_pkgversion}-SocksiPy
%description -n python%{python3_pkgversion}-%{modname}
%_description
This package is for Python3 version %{python3_version} only.
%endif
%if 0%{?python3_other_pkgversion}
%package -n python%{python3_other_pkgversion}-%{modname}
@ -114,12 +76,10 @@ This package is for Python3 version %{python3_other_version} only.
rm -rfv test/bin
%build
%py2_build
%py3_build
%{?python3_other_pkgversion: %py3_other_build}
%install
%py2_install
%py3_install
%{?python3_other_pkgversion: %py3_other_install}
@ -127,7 +87,6 @@ rm -rfv test/bin
# https://github.com/Anorov/PySocks/issues/37
# FIXME python module named test_server is needed but not packaged
%if 0
%{?with_python2: %{__python2} setup.py test}
%if 0%{?with_python3_tests}
%{?with_python3: %{__python3} setup.py test}
%{?python3_other_pkgversion: %{__python3_other} setup.py test}
@ -135,16 +94,7 @@ rm -rfv test/bin
%endif
%if 0%{?with_python2}
%files -n python2-%{modname}
%doc README.md
%license LICENSE
%{python2_sitelib}/socks.py*
%{python2_sitelib}/sockshandler.py*
%{python2_sitelib}/%{pypi_name}-%{version}*
%endif
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{modname}
%doc README.md
%license LICENSE
@ -152,7 +102,6 @@ rm -rfv test/bin
%{python3_sitelib}/sockshandler.py*
%{python3_sitelib}/__pycache__/*socks*
%{python3_sitelib}/%{pypi_name}-%{version}-*
%endif
%if 0%{?python3_other_pkgversion}
%files -n python%{python3_other_pkgversion}-%{modname}
@ -166,6 +115,10 @@ rm -rfv test/bin
%changelog
* Sun Nov 24 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.1-3
- Subpackage python2-pysocks has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Thu Oct 03 2019 Petr Viktorin <pviktori@redhat.com> - 1.7.1-2
- Remove unused Python 2 test dependencies