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