1f78d0
%bcond_with tests
1f78d0
1f78d0
%global pypi_name   PySocks
1f78d0
%global modname     pysocks
1f78d0
%global sum         A Python SOCKS client module
1f78d0
1f78d0
Name:               python-%{modname}
1f78d0
Version:            1.7.1
1f78d0
Release:            4%{?dist}
1f78d0
Summary:            %{sum}
1f78d0
1f78d0
License:            BSD
1f78d0
URL:                https://github.com/Anorov/%{pypi_name}
1f78d0
Source0:            %pypi_source
1f78d0
BuildArch:          noarch
1f78d0
# Exclude i686 arch. Due to a modularity issue it's being added to the
1f78d0
# x86_64 compose of CRB, but we don't want to ship it at all.
1f78d0
# See: https://projects.engineering.redhat.com/browse/RCM-72605
1f78d0
ExcludeArch:        i686
1f78d0
1f78d0
%global _description \
1f78d0
A fork of SocksiPy with bug fixes and extra features.\
1f78d0
\
1f78d0
Acts as a drop-in replacement to the socket module. Featuring:\
1f78d0
\
1f78d0
- SOCKS proxy client for Python 2.6 - 3.x\
1f78d0
- TCP and UDP both supported\
1f78d0
- HTTP proxy client included but not supported or recommended (you should use\
1f78d0
  urllib2's or requests' own HTTP proxy interface)\
1f78d0
- urllib2 handler included.
1f78d0
1f78d0
%description
1f78d0
%_description
1f78d0
1f78d0
%package -n python%{python3_pkgversion}-%{modname}
1f78d0
Summary:            %{sum}
1f78d0
BuildRequires:      python%{python3_pkgversion}-devel
1f78d0
BuildRequires:      python%{python3_pkgversion}-rpm-macros
1f78d0
BuildRequires:      python%{python3_pkgversion}-setuptools
1f78d0
# for tests
1f78d0
%if %{with tests}
1f78d0
BuildRequires:      python%{python3_pkgversion}-pytest
1f78d0
BuildRequires:      python%{python3_pkgversion}-psutil
1f78d0
#BuildRequires:      python%%{python3_pkgversion}-test_server
1f78d0
%endif
1f78d0
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
1f78d0
1f78d0
# This package doesn't actually exist...
1f78d0
# but if it did, we would conflict with it.
1f78d0
Conflicts:  python%{python3_pkgversion}-SocksiPy
1f78d0
1f78d0
%description -n python%{python3_pkgversion}-%{modname}
1f78d0
%_description
1f78d0
This package is for Python3 version %{python3_version} only.
1f78d0
1f78d0
%prep
1f78d0
%autosetup -n %{pypi_name}-%{version}
1f78d0
# drop useless 3rdparty code
1f78d0
rm -rfv test/bin
1f78d0
1f78d0
%build
1f78d0
%py3_build
1f78d0
1f78d0
%install
1f78d0
%py3_install
1f78d0
1f78d0
%check
1f78d0
%if %{with tests}
1f78d0
%{__python3} setup.py test
1f78d0
%endif
1f78d0
1f78d0
%files -n python%{python3_pkgversion}-%{modname}
1f78d0
%doc README.md
1f78d0
%license LICENSE
1f78d0
%{python3_sitelib}/socks.py*
1f78d0
%{python3_sitelib}/sockshandler.py*
1f78d0
%{python3_sitelib}/__pycache__/*socks*
1f78d0
%{python3_sitelib}/%{pypi_name}-%{version}-*
1f78d0
1f78d0
%changelog
1f78d0
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 1.7.1-4
1f78d0
- Exclude unsupported i686 arch
1f78d0
1f78d0
* Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 1.7.1-3
1f78d0
- Adjusted for Python 3.8 module in RHEL 8
1f78d0
1f78d0
* Thu Oct 03 2019 Petr Viktorin <pviktori@redhat.com> - 1.7.1-2
1f78d0
- Remove unused Python 2 test dependencies
1f78d0
1f78d0
* Sun Sep 22 2019 Kevin Fenzi <kevin@scrye.com> - 1.7.1-1
1f78d0
- Update to 1.7.1. Fixes bug #1753823
1f78d0
1f78d0
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-4
1f78d0
- Rebuilt for Python 3.8
1f78d0
1f78d0
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-3
1f78d0
- Bootstrap for Python 3.8
1f78d0
1f78d0
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
1f78d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
1f78d0
1f78d0
* Sat May 18 2019 Kevin Fenzi <kevin@scrye.com> - 1.7.0-1
1f78d0
- Update to 1.7.0. Fixes bug #1708882
1f78d0
1f78d0
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.8-7
1f78d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1f78d0
1f78d0
* Sun Nov 11 2018 Kevin Fenzi <kevin@scrye.com> - 1.6.8-6
1f78d0
- Add upstream patch to avoid DeprecationWarning. Fixes bug #1648583
1f78d0
1f78d0
* Wed Oct 03 2018 Raphael Groner <projects.rg@smart.ms> - 1.6.8-5
1f78d0
- add python3_other subpackage for epel7
1f78d0
- prepare removal of python2 subpackage in Fedora
1f78d0
- use pypi macros
1f78d0
- try to enable tests provided actually from tarball
1f78d0
1f78d0
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.8-4
1f78d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
1f78d0
1f78d0
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 1.6.8-3
1f78d0
- Rebuilt for Python 3.7
1f78d0
1f78d0
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.8-2
1f78d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1f78d0
1f78d0
* Fri Dec 22 2017 Kevin Fenzi <kevin@scrye.com> - 1.6.8-1
1f78d0
- Update to 1.6.8. Fixes bug #1528490
1f78d0
1f78d0
* Mon Sep 11 2017 Carl George <carl@george.computer> - 1.6.7-1
1f78d0
- Latest upstream
1f78d0
- Add setuptools dependency
1f78d0
1f78d0
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.7-5
1f78d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1f78d0
1f78d0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.7-4
1f78d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1f78d0
1f78d0
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.7-3
1f78d0
- Rebuild for Python 3.6
1f78d0
1f78d0
* Mon Nov 28 2016 Tim Orling <ticotimo@gmail.com> - 1.5.7-2
1f78d0
- Ship python34-pysocks in EL6
1f78d0
1f78d0
* Sat Sep 17 2016 Kevin Fenzi <kevin@scrye.com> - 1.5.7-1
1f78d0
- Update to 1.5.7
1f78d0
1f78d0
* Fri Sep 16 2016 Orion Poplawski <orion@cora.nwra.com> - 1.5.6-6
1f78d0
- Ship python34-pysocks in EPEL7
1f78d0
1f78d0
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.6-5
1f78d0
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
1f78d0
1f78d0
* Fri Jul 15 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-4
1f78d0
- Change our conflicts on python-SocksiPy to an obsoletes/provides.
1f78d0
  https://bugzilla.redhat.com/show_bug.cgi?id=1334407
1f78d0
1f78d0
* Mon May 09 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-3
1f78d0
- Fix typo in explicit conflicts.
1f78d0
1f78d0
* Tue May 03 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-2
1f78d0
- We don't actually need setuptools here.
1f78d0
1f78d0
* Mon May 02 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-1
1f78d0
- Initial package for Fedora