93baa8
%if 0%{?fedora}
93baa8
%global with_python3_tests 1
93baa8
%endif
93baa8
93baa8
%global pypi_name   PySocks
93baa8
%global modname     pysocks
93baa8
%global sum         A Python SOCKS client module
93baa8
93baa8
Name:               python-%{modname}
93baa8
Version:            1.7.1
93baa8
Release:            10%{?dist}
93baa8
Summary:            %{sum}
93baa8
93baa8
License:            BSD
93baa8
URL:                https://github.com/Anorov/%{pypi_name}
93baa8
Source0:            %pypi_source
93baa8
BuildArch:          noarch
93baa8
93baa8
%global _description \
93baa8
A fork of SocksiPy with bug fixes and extra features.\
93baa8
\
93baa8
Acts as a drop-in replacement to the socket module. Featuring:\
93baa8
\
93baa8
- SOCKS proxy client for Python 2.6 - 3.x\
93baa8
- TCP and UDP both supported\
93baa8
- HTTP proxy client included but not supported or recommended (you should use\
93baa8
  urllib2's or requests' own HTTP proxy interface)\
93baa8
- urllib2 handler included.
93baa8
93baa8
%description
93baa8
%_description
93baa8
93baa8
93baa8
%package -n python%{python3_pkgversion}-%{modname}
93baa8
Summary:            %{sum}
93baa8
BuildRequires:      python%{python3_pkgversion}-devel
93baa8
BuildRequires:      python%{python3_pkgversion}-setuptools
93baa8
# for tests
93baa8
%if 0%{?with_python3_tests}
93baa8
BuildRequires:      python%{python3_pkgversion}-pytest
93baa8
BuildRequires:      python%{python3_pkgversion}-psutil
93baa8
#BuildRequires:      python%%{python3_pkgversion}-test_server
93baa8
%endif
93baa8
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
93baa8
93baa8
# This package doesn't actually exist...
93baa8
# but if it did, we would conflict with it.
93baa8
Conflicts:  python%{python3_pkgversion}-SocksiPy
93baa8
93baa8
%description -n python%{python3_pkgversion}-%{modname}
93baa8
%_description
93baa8
This package is for Python3 version %{python3_version} only.
93baa8
93baa8
%if 0%{?python3_other_pkgversion}
93baa8
%package -n python%{python3_other_pkgversion}-%{modname}
93baa8
Summary:            %{sum}
93baa8
BuildRequires:      python%{python3_other_pkgversion}-devel
93baa8
BuildRequires:      python%{python3_other_pkgversion}-setuptools
93baa8
# for tests
93baa8
%if 0%{?with_python3_tests}
93baa8
BuildRequires:      python%{python3_other_pkgversion}-pytest
93baa8
BuildRequires:      python%{python3_other_pkgversion}-psutil
93baa8
#BuildRequires:      python%%{python3_other_pkgversion}-test_server
93baa8
%endif
93baa8
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{modname}}
93baa8
93baa8
%description -n python%{python3_other_pkgversion}-%{modname}
93baa8
%_description
93baa8
This package is for Python3 version %{python3_other_version} only.
93baa8
%endif
93baa8
93baa8
93baa8
%prep
93baa8
%autosetup -n %{pypi_name}-%{version}
93baa8
# drop useless 3rdparty code
93baa8
rm -rfv test/bin
93baa8
93baa8
%build
93baa8
%py3_build
93baa8
%{?python3_other_pkgversion: %py3_other_build}
93baa8
93baa8
%install
93baa8
%py3_install
93baa8
%{?python3_other_pkgversion: %py3_other_install}
93baa8
93baa8
%check
93baa8
# https://github.com/Anorov/PySocks/issues/37
93baa8
# FIXME python module named test_server is needed but not packaged
93baa8
%if 0
93baa8
%if 0%{?with_python3_tests}
93baa8
%{?with_python3: %{__python3} setup.py test}
93baa8
%{?python3_other_pkgversion: %{__python3_other} setup.py test}
93baa8
%endif
93baa8
%endif
93baa8
93baa8
93baa8
93baa8
%files -n python%{python3_pkgversion}-%{modname}
93baa8
%doc README.md
93baa8
%license LICENSE
93baa8
%{python3_sitelib}/socks.py*
93baa8
%{python3_sitelib}/sockshandler.py*
93baa8
%{python3_sitelib}/__pycache__/*socks*
93baa8
%{python3_sitelib}/%{pypi_name}-%{version}-*
93baa8
93baa8
%if 0%{?python3_other_pkgversion}
93baa8
%files -n python%{python3_other_pkgversion}-%{modname}
93baa8
%doc README.md
93baa8
%license LICENSE
93baa8
%{python3_other_sitelib}/socks.py*
93baa8
%{python3_other_sitelib}/sockshandler.py*
93baa8
%{python3_other_sitelib}/__pycache__/*socks*
93baa8
%{python3_other_sitelib}/%{pypi_name}-%{version}-*
93baa8
%endif
93baa8
93baa8
93baa8
%changelog
93baa8
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.1-10
93baa8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
93baa8
  Related: rhbz#1991688
93baa8
93baa8
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.1-9
93baa8
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
93baa8
93baa8
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-8
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
93baa8
93baa8
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-7
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
93baa8
93baa8
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.7.1-6
93baa8
- Rebuilt for Python 3.9
93baa8
93baa8
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1.7.1-5
93baa8
- Bootstrap for Python 3.9
93baa8
93baa8
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-4
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
93baa8
93baa8
* Sun Nov 24 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.1-3
93baa8
- Subpackage python2-pysocks has been removed
93baa8
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
93baa8
93baa8
* Thu Oct 03 2019 Petr Viktorin <pviktori@redhat.com> - 1.7.1-2
93baa8
- Remove unused Python 2 test dependencies
93baa8
93baa8
* Sun Sep 22 2019 Kevin Fenzi <kevin@scrye.com> - 1.7.1-1
93baa8
- Update to 1.7.1. Fixes bug #1753823
93baa8
93baa8
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-4
93baa8
- Rebuilt for Python 3.8
93baa8
93baa8
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-3
93baa8
- Bootstrap for Python 3.8
93baa8
93baa8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
93baa8
93baa8
* Sat May 18 2019 Kevin Fenzi <kevin@scrye.com> - 1.7.0-1
93baa8
- Update to 1.7.0. Fixes bug #1708882
93baa8
93baa8
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.8-7
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
93baa8
93baa8
* Sun Nov 11 2018 Kevin Fenzi <kevin@scrye.com> - 1.6.8-6
93baa8
- Add upstream patch to avoid DeprecationWarning. Fixes bug #1648583
93baa8
93baa8
* Wed Oct 03 2018 Raphael Groner <projects.rg@smart.ms> - 1.6.8-5
93baa8
- add python3_other subpackage for epel7
93baa8
- prepare removal of python2 subpackage in Fedora
93baa8
- use pypi macros
93baa8
- try to enable tests provided actually from tarball
93baa8
93baa8
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.8-4
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
93baa8
93baa8
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 1.6.8-3
93baa8
- Rebuilt for Python 3.7
93baa8
93baa8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.8-2
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
93baa8
93baa8
* Fri Dec 22 2017 Kevin Fenzi <kevin@scrye.com> - 1.6.8-1
93baa8
- Update to 1.6.8. Fixes bug #1528490
93baa8
93baa8
* Mon Sep 11 2017 Carl George <carl@george.computer> - 1.6.7-1
93baa8
- Latest upstream
93baa8
- Add setuptools dependency
93baa8
93baa8
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.7-5
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
93baa8
93baa8
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.7-4
93baa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
93baa8
93baa8
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.7-3
93baa8
- Rebuild for Python 3.6
93baa8
93baa8
* Mon Nov 28 2016 Tim Orling <ticotimo@gmail.com> - 1.5.7-2
93baa8
- Ship python34-pysocks in EL6
93baa8
93baa8
* Sat Sep 17 2016 Kevin Fenzi <kevin@scrye.com> - 1.5.7-1
93baa8
- Update to 1.5.7
93baa8
93baa8
* Fri Sep 16 2016 Orion Poplawski <orion@cora.nwra.com> - 1.5.6-6
93baa8
- Ship python34-pysocks in EPEL7
93baa8
93baa8
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.6-5
93baa8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
93baa8
93baa8
* Fri Jul 15 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-4
93baa8
- Change our conflicts on python-SocksiPy to an obsoletes/provides.
93baa8
  https://bugzilla.redhat.com/show_bug.cgi?id=1334407
93baa8
93baa8
* Mon May 09 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-3
93baa8
- Fix typo in explicit conflicts.
93baa8
93baa8
* Tue May 03 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-2
93baa8
- We don't actually need setuptools here.
93baa8
93baa8
* Mon May 02 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-1
93baa8
- Initial package for Fedora