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