Initial import (#1332206)
This commit is contained in:
parent
bb07f20ae6
commit
733ebbd832
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/PySocks-1.5.6.tar.gz
|
134
python-pysocks.spec
Normal file
134
python-pysocks.spec
Normal file
@ -0,0 +1,134 @@
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%{!?_licensedir: %global license %%doc}
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||
%{!?__python2: %global __python2 /usr/bin/python2}
|
||||
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%endif
|
||||
|
||||
%global distname PySocks
|
||||
%global flatname pysocks
|
||||
%global sum A Python SOCKS client module
|
||||
|
||||
Name: python-pysocks
|
||||
Version: 1.5.6
|
||||
Release: 1%{?dist}
|
||||
Summary: %{sum}
|
||||
|
||||
License: BSD
|
||||
URL: http://pypi.python.org/pypi/PySocks
|
||||
Source0: https://pypi.python.org/packages/03/a5/957346ba692216cc00e8146fb1a5da0854f8320d7eb073b1cfcb7ad977b5/%{distname}-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-setuptools
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%endif
|
||||
|
||||
%description
|
||||
A fork of SocksiPy with bug fixes and extra features.
|
||||
|
||||
Acts as a drop-in replacement to the socket module. Featuring:
|
||||
|
||||
- SOCKS proxy client for Python 2.6 - 3.x
|
||||
- TCP and UDP both supported
|
||||
- HTTP proxy client included but not supported or recommended (you should use
|
||||
urllib2's or requests' own HTTP proxy interface)
|
||||
- urllib2 handler included.
|
||||
|
||||
|
||||
%package -n python2-%{flatname}
|
||||
Summary: %{sum}
|
||||
%{?python_provide:%python_provide python2-%{flatname}}
|
||||
|
||||
Conflicts: python3-SocksiPy
|
||||
|
||||
%description -n python2-%{flatname}
|
||||
A fork of SocksiPy with bug fixes and extra features.
|
||||
|
||||
Acts as a drop-in replacement to the socket module. Featuring:
|
||||
|
||||
- SOCKS proxy client for Python 2.6 - 3.x
|
||||
- TCP and UDP both supported
|
||||
- HTTP proxy client included but not supported or recommended (you should use
|
||||
urllib2's or requests' own HTTP proxy interface)
|
||||
- urllib2 handler included.
|
||||
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{flatname}
|
||||
Summary: %{sum}
|
||||
%{?python_provide:%python_provide python3-%{flatname}}
|
||||
|
||||
# This package doesn't actually exist... but if it did, we would conflict with
|
||||
# it.
|
||||
Conflicts: python3-SocksiPy
|
||||
|
||||
%description -n python3-%{flatname}
|
||||
A fork of SocksiPy with bug fixes and extra features.
|
||||
|
||||
Acts as a drop-in replacement to the socket module. Featuring:
|
||||
|
||||
- SOCKS proxy client for Python 2.6 - 3.x
|
||||
- TCP and UDP both supported
|
||||
- HTTP proxy client included but not supported or recommended (you should use
|
||||
urllib2's or requests' own HTTP proxy interface)
|
||||
- urllib2 handler included.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{distname}-%{version}
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
#%check
|
||||
## No tests included in the tarball...
|
||||
## https://github.com/Anorov/PySocks/issues/37
|
||||
#%{__python2} setup.py test
|
||||
#%if 0%{?with_python3}
|
||||
#%{__python3} setup.py test
|
||||
#%endif
|
||||
|
||||
%files -n python2-%{flatname}
|
||||
# https://github.com/Anorov/PySocks/issues/42
|
||||
#%doc README.md
|
||||
# https://github.com/Anorov/PySocks/issues/43
|
||||
#%license LICENSE
|
||||
%{python2_sitelib}/socks.py*
|
||||
%{python2_sitelib}/sockshandler.py*
|
||||
%{python2_sitelib}/%{distname}-%{version}*
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{flatname}
|
||||
# https://github.com/Anorov/PySocks/issues/42
|
||||
#%doc README.md
|
||||
# https://github.com/Anorov/PySocks/issues/43
|
||||
#%license LICENSE
|
||||
%{python3_sitelib}/socks.py*
|
||||
%{python3_sitelib}/sockshandler.py*
|
||||
%{python3_sitelib}/__pycache__/*socks*
|
||||
%{python3_sitelib}/%{distname}-%{version}-*
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon May 02 2016 Ralph Bean <rbean@redhat.com> - 1.5.6-1
|
||||
- Initial package for Fedora
|
Loading…
Reference in New Issue
Block a user