|
|
733ebbd |
%if 0%{?fedora}
|
|
|
733ebbd |
%global with_python3 1
|
|
|
733ebbd |
%endif
|
|
|
733ebbd |
|
|
|
733ebbd |
%{!?_licensedir: %global license %%doc}
|
|
|
733ebbd |
|
|
|
733ebbd |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
|
733ebbd |
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
733ebbd |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
733ebbd |
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
733ebbd |
%endif
|
|
|
733ebbd |
|
|
|
733ebbd |
%global distname PySocks
|
|
|
733ebbd |
%global flatname pysocks
|
|
|
733ebbd |
%global sum A Python SOCKS client module
|
|
|
733ebbd |
|
|
|
733ebbd |
Name: python-pysocks
|
|
|
733ebbd |
Version: 1.5.6
|
|
|
253de20 |
Release: 4%{?dist}
|
|
|
733ebbd |
Summary: %{sum}
|
|
|
733ebbd |
|
|
|
733ebbd |
License: BSD
|
|
|
733ebbd |
URL: http://pypi.python.org/pypi/PySocks
|
|
|
733ebbd |
Source0: https://pypi.python.org/packages/03/a5/957346ba692216cc00e8146fb1a5da0854f8320d7eb073b1cfcb7ad977b5/%{distname}-%{version}.tar.gz
|
|
|
733ebbd |
BuildArch: noarch
|
|
|
733ebbd |
|
|
|
733ebbd |
BuildRequires: python2-devel
|
|
|
733ebbd |
|
|
|
733ebbd |
%if 0%{?with_python3}
|
|
|
733ebbd |
BuildRequires: python3-devel
|
|
|
733ebbd |
%endif
|
|
|
733ebbd |
|
|
|
733ebbd |
%description
|
|
|
733ebbd |
A fork of SocksiPy with bug fixes and extra features.
|
|
|
733ebbd |
|
|
|
733ebbd |
Acts as a drop-in replacement to the socket module. Featuring:
|
|
|
733ebbd |
|
|
|
733ebbd |
- SOCKS proxy client for Python 2.6 - 3.x
|
|
|
733ebbd |
- TCP and UDP both supported
|
|
|
733ebbd |
- HTTP proxy client included but not supported or recommended (you should use
|
|
|
733ebbd |
urllib2's or requests' own HTTP proxy interface)
|
|
|
733ebbd |
- urllib2 handler included.
|
|
|
733ebbd |
|
|
|
733ebbd |
|
|
|
733ebbd |
%package -n python2-%{flatname}
|
|
|
733ebbd |
Summary: %{sum}
|
|
|
733ebbd |
%{?python_provide:%python_provide python2-%{flatname}}
|
|
|
733ebbd |
|
|
|
1309dd8 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1334407
|
|
|
253de20 |
Obsoletes: python-SocksiPy
|
|
|
253de20 |
Obsoletes: python2-SocksiPy
|
|
|
253de20 |
Provides: python-SocksiPy
|
|
|
253de20 |
Provides: python2-SocksiPy
|
|
|
733ebbd |
|
|
|
733ebbd |
%description -n python2-%{flatname}
|
|
|
733ebbd |
A fork of SocksiPy with bug fixes and extra features.
|
|
|
733ebbd |
|
|
|
733ebbd |
Acts as a drop-in replacement to the socket module. Featuring:
|
|
|
733ebbd |
|
|
|
733ebbd |
- SOCKS proxy client for Python 2.6 - 3.x
|
|
|
733ebbd |
- TCP and UDP both supported
|
|
|
733ebbd |
- HTTP proxy client included but not supported or recommended (you should use
|
|
|
733ebbd |
urllib2's or requests' own HTTP proxy interface)
|
|
|
733ebbd |
- urllib2 handler included.
|
|
|
733ebbd |
|
|
|
733ebbd |
|
|
|
733ebbd |
%if 0%{?with_python3}
|
|
|
733ebbd |
%package -n python3-%{flatname}
|
|
|
733ebbd |
Summary: %{sum}
|
|
|
733ebbd |
%{?python_provide:%python_provide python3-%{flatname}}
|
|
|
733ebbd |
|
|
|
733ebbd |
# This package doesn't actually exist... but if it did, we would conflict with
|
|
|
733ebbd |
# it.
|
|
|
733ebbd |
Conflicts: python3-SocksiPy
|
|
|
733ebbd |
|
|
|
733ebbd |
%description -n python3-%{flatname}
|
|
|
733ebbd |
A fork of SocksiPy with bug fixes and extra features.
|
|
|
733ebbd |
|
|
|
733ebbd |
Acts as a drop-in replacement to the socket module. Featuring:
|
|
|
733ebbd |
|
|
|
733ebbd |
- SOCKS proxy client for Python 2.6 - 3.x
|
|
|
733ebbd |
- TCP and UDP both supported
|
|
|
733ebbd |
- HTTP proxy client included but not supported or recommended (you should use
|
|
|
733ebbd |
urllib2's or requests' own HTTP proxy interface)
|
|
|
733ebbd |
- urllib2 handler included.
|
|
|
733ebbd |
%endif
|
|
|
733ebbd |
|
|
|
733ebbd |
|
|
|
733ebbd |
%prep
|
|
|
733ebbd |
%autosetup -n %{distname}-%{version}
|
|
|
733ebbd |
|
|
|
733ebbd |
%build
|
|
|
733ebbd |
%py2_build
|
|
|
733ebbd |
%if 0%{?with_python3}
|
|
|
733ebbd |
%py3_build
|
|
|
733ebbd |
%endif
|
|
|
733ebbd |
|
|
|
733ebbd |
%install
|
|
|
733ebbd |
%py2_install
|
|
|
733ebbd |
%if 0%{?with_python3}
|
|
|
733ebbd |
%py3_install
|
|
|
733ebbd |
%endif
|
|
|
733ebbd |
|
|
|
dcba5d8 |
#%%check
|
|
|
733ebbd |
## No tests included in the tarball...
|
|
|
733ebbd |
## https://github.com/Anorov/PySocks/issues/37
|
|
|
dcba5d8 |
#%%{__python2} setup.py test
|
|
|
dcba5d8 |
#%%if 0%%{?with_python3}
|
|
|
dcba5d8 |
#%%{__python3} setup.py test
|
|
|
dcba5d8 |
#%%endif
|
|
|
733ebbd |
|
|
|
733ebbd |
%files -n python2-%{flatname}
|
|
|
733ebbd |
# https://github.com/Anorov/PySocks/issues/42
|
|
|
dcba5d8 |
#%%doc README.md
|
|
|
733ebbd |
# https://github.com/Anorov/PySocks/issues/43
|
|
|
dcba5d8 |
#%%license LICENSE
|
|
|
733ebbd |
%{python2_sitelib}/socks.py*
|
|
|
733ebbd |
%{python2_sitelib}/sockshandler.py*
|
|
|
733ebbd |
%{python2_sitelib}/%{distname}-%{version}*
|
|
|
733ebbd |
|
|
|
733ebbd |
%if 0%{?with_python3}
|
|
|
733ebbd |
%files -n python3-%{flatname}
|
|
|
733ebbd |
# https://github.com/Anorov/PySocks/issues/42
|
|
|
dcba5d8 |
#%%doc README.md
|
|
|
733ebbd |
# https://github.com/Anorov/PySocks/issues/43
|
|
|
dcba5d8 |
#%%license LICENSE
|
|
|
733ebbd |
%{python3_sitelib}/socks.py*
|
|
|
733ebbd |
%{python3_sitelib}/sockshandler.py*
|
|
|
733ebbd |
%{python3_sitelib}/__pycache__/*socks*
|
|
|
733ebbd |
%{python3_sitelib}/%{distname}-%{version}-*
|
|
|
733ebbd |
%endif
|
|
|
733ebbd |
|
|
|
733ebbd |
|
|
|
733ebbd |
%changelog
|
|
|
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
|