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